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

dict

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dict - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

dict.js

@@ -49,3 +49,3 @@ "use strict";

store[mangled] = value;
return store[mangled] = value;
},

@@ -52,0 +52,0 @@ has: function (key) {

@@ -11,3 +11,3 @@ {

],
"version": "1.3.0",
"version": "1.4.0",
"author": "Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com)",

@@ -19,5 +19,3 @@ "license": "WTFPL",

},
"bugs": {
"url": "http://github.com/domenic/dict/issues"
},
"bugs": "https://github.com/domenic/dict/issues",
"main": "./dict.js",

@@ -24,0 +22,0 @@ "scripts": {

@@ -59,3 +59,3 @@ # An Easy But Safe String-Keyed Store

d.has("I"); // false
d.set("I", "The Phantom Menace");
d.set("I", "The Phantom Menace"); // "The Phantom Menace"
d.get("I"); // "The Phantom Menace"

@@ -97,2 +97,3 @@ d.delete("I"); // true

* `get` accepts a second argument as a fallback for if the key isn't present (like [Mozilla's `WeakMap`][4]).
* `set` returns the value set, just like assignment to an object would.
* Doesn't let you get away with being dumb: if you pass a non-string as a key, you're going to get a `TypeError`.

@@ -99,0 +100,0 @@

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