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

enmap

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enmap - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

package.json
{
"name": "enmap",
"version": "2.1.0",
"version": "2.1.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -104,3 +104,3 @@ /**

set(key, val) {
if (val === undefined || val === null) throw `Value provided for ${key} was null or undefined. Please provide a value.`;
if (val == null) throw `Value provided for ${key} was null or undefined. Please provide a value.`;
let insert = val;

@@ -133,5 +133,5 @@ if (val.constructor.name === 'Object') {

setAsync(key, val) {
if (!val) throw 'Cannot set null, undefined or empty value to a key. Use Enmap.delete(key) instead.';
if (val == null) throw `Value provided for ${key} was null or undefined. Please provide a value.`;
let insert = val;
if (typeof val === 'object') {
if (val.constructor.name === 'Object') {
const temp = {};

@@ -143,3 +143,5 @@ for (const prop in val) {

}
insert = val.constructor.name === 'Array' ? [...insert] : insert;
if (val.constructor.name === 'Array') {
insert = [...insert];
}
super.set(key, insert);

@@ -595,2 +597,3 @@ return this.db.set(key, insert);

* @param {boolean} bulk Optional. Defaults to True. whether to use the provider's "bulk" delete feature if it has one.
* @return {Promise} Returns a promise that is resolved when the database is cleared.
*/

@@ -607,3 +610,3 @@ async deleteAllAsync(bulk = true) {

}
this.clear();
return this.clear();
}

@@ -610,0 +613,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