Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

frozen-set

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frozen-set

Like Set, but without methods for mutation

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-98.36%
Maintainers
1
Weekly downloads
 
Created
Source

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).

Keywords

FAQs

Package last updated on 31 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc