Module: barejs

The BareJS module is the entry point for accessing BareJS's classes and polyfills.

Source:

Classes

decl
Destroyable
EventArgs
Evented
Exception

Members

(static) Intl :function

This is either the native Intl or the fallback provided by BareJS. Note that BareJS's fallback just provides a similar API, it has not actual localization features. It's main purpose is to gracefully fallback to very limited formatting on environments that don't support Intl. For proper support, load a full Intl polyfill.

Type:
  • function
Source:

(static) Map :function

This is either the native Map or the polyfill provided by BareJS. This implementation is ensured to have iterator support (using the polyfill), if no iterator support is required it is better to use NMap instead.

Type:
  • function
Source:

(static) NMap :function

NMap - Version of Map that prefers the native implementation over the polyfill, even if it doesn't have iterator support (like in Internet Explorer 11). If Iterator support is required, use Map instead.

Type:
  • function
Source:

(static) NSet :function

NSet - Version of Set that prefers the native implementation over the polyfill, even if it doesn't have iterator support (like in Internet Explorer 11). If Iterator support is required, use Set instead.

Type:
  • function
Source:

(static) Promise :function

This is either the native Promise or the polyfill provided by BareJS.

Type:
  • function
Source:

(static) Set :function

This is either the native Set or the polyfill provided by BareJS. This implementation is ensured to have iterator support (using the polyfill), if no iterator support is required it is better to use NSet instead.

Type:
  • function
Source:

(static) Symbol :function

This is either the native Symbol or the polyfill provided by BareJS.

Type:
  • function
Source:

(static) WeakMap :function

This is either the native WeakMap or the polyfill provided by BareJS.

Type:
  • function
Source:

(static) WeakSet :function

This is either the native WeakSet or the polyfill provided by BareJS.

Type:
  • function
Source:

Methods

(static) load()

The BareJS module contains an AMD loader plugin to reference specific parts of BareJS directly. For example, this allows to require "barejs!decl", "barejs!Promise", "barejs!NMap" or "barejs!Map"

Source:

(static) write()

While we want to provide the plugin shortcut to objects, we don't want to build this into a layer.

Source: