Skip to content

A minimal WeakMap polyfill written in TypeScript, unit tested using Jasmine and Karma.

License

Notifications You must be signed in to change notification settings

brendenpalmer/weakmap

Repository files navigation

WeakMap Polyfill

  • A minimal WeakMap polyfill written in TypeScript, unit tested using Jasmine and Karma.
  • The polyfill is full featured when comparing to the native implementation of WeakMap. All native operations complete with an asymptotic time complexity of O(1).
  • Built file size is 2 KB minified.

Installation

Ensure that Node and npm are both installed.

Then, install gulp globally:

npm install -g gulp

Finally, install all development dependencies:

cd CLONED_REPO_DIR
npm install

Run the default gulp task to run the linter, run unit tests, build documentation, and build the required scripts.

Look at the gulp folder to view the available tasks to run.

Usage

If you're interested in contributing, see the Contributing section below. Otherwise, install this package via npm: es6-weakmap.

The dist folder contains all you'll need to get up and running.

Documentation

The built documentation will always be located here: Documentation.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request.

History

See the CHANGELOG.

License

Licensed under MIT. See the full license here: license.

About

A minimal WeakMap polyfill written in TypeScript, unit tested using Jasmine and Karma.

Resources

License

Stars

Watchers

Forks

Packages

No packages published