1.0.2 • Published 5 years ago

frozen-set v1.0.2

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
5 years ago

frozen-set

This npm module provides frozen (fixed) sets: sets which will not change after construction. These behave like ES2015 Sets in all other ways, but do not expose add, clear, or delete (or any other set-modifying methods which might be added to the language in the future).

There are two versions: FrozenSet and MostlyFrozenSet. These have the same API, but FrozenSet will deter even an actively malicious adversary from modifying the underlying set, whereas MostlyFrozenSet will only discourage people who are not really dedicated. MostlyFrozenSet is probably faster.

Note that these are only "shallowly" frozen - that is, if the set contains a mutable object, that object will remain mutable (just as with Object.freeze).

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago