Skip to content

Latest commit

 

History

History

api

api

npm version npm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

Common, generic types, interfaces & mixins.

This package is implicitly used by most other projects in this repository. It defines:

  • Dozens of generic, common interfaces & types
  • Class & method decorators
  • Mixins
  • Logging
  • Assert (can be disabled for production builds)
  • Typedarray utilities

Status

STABLE - used in production

Search or submit any issues for this package

Installation

yarn add @thi.ng/api
// ES module
<script type="module" src="https://unpkg.com/@thi.ng/api?module" crossorigin></script>

// UMD
<script src="https://unpkg.com/@thi.ng/api/lib/index.umd.js" crossorigin></script>

Package sizes (gzipped, pre-treeshake): ESM: 2.18 KB / CJS: 2.33 KB / UMD: 2.25 KB

Dependencies

None

API

Generated API docs

Environment variables

The following env variables are used to control the behavior of some functions in production builds:

  • UMBRELLA_ASSERTS - if set to 1 the assert function will always be enabled. By default, assert() is disabled for production builds, i.e. if process.env.NODE_ENV === "production".
  • UMBRELLA_GLOBALS - if set to 1 the exposeGlobal function will always be enabled. By default, exposeGlobal() is disabled for production builds, i.e. if process.env.NODE_ENV === "production".

Authors

Maintainer

Contributors

If this project contributes to an academic publication, please cite it as:

@misc{thing-api,
  title = "@thi.ng/api",
  author = "Karsten Schmidt and others",
  note = "https://thi.ng/api",
  year = 2016
}

License

© 2016 - 2021 Karsten Schmidt // Apache Software License 2.0