JSPM

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

Extending the Set class in order to support mathematical set properties and operations.

Package Exports

  • set-extensions

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 (set-extensions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

set-extensions

Extending the Javascript Set class in order to support properties and operations from basic set theory.

JavaScript Style Guide Build Status

Scope

Please read this first, to a get a better understanding, whether this package suits your needs.

Completeness vs. Performance

Focus of this package is to provide a Set implementation, which can be used in context of axiomatic set theory. Currently

Methods are primarily designed to

  • run with any values, but also values as Sets (of Sets, arbitrary depth)
  • work with arbitrary (finite) numbers of sets (depending on operation, see documentation)
  • conform with their respective properties (Associative, Commutative etc.)

Some algorithms grow exponentially with a raising number of sets to be processes. Please, see the documentation notes on the respective methods.

Future Implementations

Currently this package only supports finite sets. A future implementation should include generators to support infinite sets and function-based operations with infinite sets.

Installation and Usage

Install this package as usual:

$ npm install --save set-extensions

Import this package in your startup code. The package automatically extends the global Set object.

import 'set-extensions'

You can verify this by checking for the name property:

Set.name // "ExtendedSet", formerly "Set"

API Documentation

There is a markdown version and a html version of the API documentation. If you think this documentation can be improved, please leave a pull request or open an issue.