JSPM

iterable-weak-collections

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q16630F
  • License MIT

Iterable weak maps and weak sets.

Package Exports

  • iterable-weak-collections
  • iterable-weak-collections/dst/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (iterable-weak-collections) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Iterable Weak Collections

Installation

Install via NPM.

npm install iterable-weak-collections

Information

This library adds IterableWeakSet and IterableWeakMap. They implement the built-in Set and Map interfaces.

import { IterableWeakMap, IterableWeakSet } from "iterable-weak-collections";
const map = new IterableWeakMap();
const set = new IterableWeakSet();
class IterableWeakMap<K extends Object, T> implements Map<K,T> {
    
}

class IterableWeakSet<K extends Object, T> implements Set<K,T> {
    
}

Technical Details

This library is implemented using WeakRef, which is supported in Node and most major browsers.

Example Uses

  • Sub-pub
  • Code diagnostics and monitoring

License

MIT License

All files can be used for commercial or non-commercial purposes. Do not resell. Attribution is appreciated but not due.