@esfx/collection-core-shim
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@esfx/collection-core-shim

The @esfx/collection-core-shim package provides a global shim to add default @esfx/collection-core behaviors to global objects.

Overview

Installation

npm i @esfx/collection-core-shim

Usage

The global shim adds a default implementation the collection interfaces to the following global objects:

  • Array implements:
    • ReadonlyCollection
    • Collection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
    • IndexedCollection
  • Uint8Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Uint8ClampedArray implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Uint16Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Uint32Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Int8Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Int16Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Int32Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Float32Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Float64Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • BigUint64Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • BigInt64Array implements:
    • ReadonlyCollection
    • ReadonlyIndexedCollection
    • FixedSizeIndexedCollection
  • Set implements:
    • ReadonlyCollection
    • Collection
  • Map implements:
    • ReadonlyKeyedCollection
    • KeyedCollection
  • WeakSet implements:
    • ReadonlyContainer
    • Container
  • WeakMap implements:
    • ReadonlyKeyedContainer
    • KeyedContainer

To install the global shim, import @esfx/collection-core-shim:

import "@esfx/collection-core-shim"; // triggers global-scope side effects

[1, 2, 3][Collection.size]; // 3

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.0-dev.81dev
1.0.01latest
1.1.0-alpha.2023072603220next

Version History

VersionDownloads (Last 7 Days)Published
1.1.0-alpha.2023072603220
1.1.0-alpha.2023060802530
1.1.0-alpha.2023060614060
1.1.0-alpha.2023060613160
1.1.0-alpha.2023060512280
1.1.0-alpha.2023050821040
1.1.0-alpha.2023020917150
1.1.0-alpha.2023020719350
1.1.0-alpha.2022112914460
1.1.0-alpha.2022112215090
1.1.0-alpha.2022102521390
1.0.01
1.0.0-dev.81
1.0.0-dev.70
1.0.0-dev.60
1.0.0-dev.50
1.0.0-pre.440
1.0.0-dev.40
1.0.0-pre.430
1.0.0-pre.420
1.0.0-pre.410
1.0.0-pre.400
1.0.0-pre.390
1.0.0-prenative.10
1.0.0-pre.380
1.0.0-dev.00
1.0.0-pre.370
1.0.0-pre.360
1.0.0-pre.350
1.0.0-pre.340
1.0.0-pre.331
1.0.0-pre.310
1.0.0-prenative.00
1.0.0-pre.240
1.0.0-pre.230
1.0.0-pre.190
1.0.0-pre.170
1.0.0-pre.160
1.0.0-pre.130
1.0.0-pre.120
1.0.0-pre.110
1.0.0-pre.100
1.0.0-pre.90
1.0.0-pre.80
1.0.0-pre.60
1.0.0-pre.50
1.0.0-pre.40
1.0.0-pre.30
1.0.0-pre.20
1.0.0-pre.11
1.0.0-pre.00

Package Sidebar

Install

npm i @esfx/collection-core-shim

Weekly Downloads

4

Version

1.0.0

License

Apache-2.0

Unpacked Size

60 kB

Total Files

8

Last publish

Collaborators

  • rbuckton