@esfx/collection-core-shim Package
Provides a global shim to add default @esfx/collection-core behaviors to global objects.
Installation
npm i @esfx/collection-core-shim
Usage
import "@esfx/collection-core-shim"; // triggers global-scope side effects
import { Collection } from "@esfx/collection-core";
[1, 2, 3][Collection.size]; // 3
Remarks
The global shim adds a default implementation the collection interfaces to the following global objects:
- Array implements:
- Uint8Array implements:
- Uint8ClampedArray implements:
- Uint16Array implements:
- Uint32Array implements:
- Int8Array implements:
- Int16Array implements:
- Int32Array implements:
- Float32Array implements:
- Float64Array implements:
- BigUint64Array implements:
- BigInt64Array implements:
- Set implements:
- Map implements:
- WeakSet implements:
- WeakMap implements: