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 5.2.1 to 5.2.2

2

package.json
{
"name": "enmap",
"version": "5.2.1",
"version": "5.2.2",
"description": "A simple database wrapper to make sqlite database interactions much easier for beginners, with additional array helper methods.",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

@@ -408,4 +408,4 @@ // Lodash should probably be a core lib but hey, it's useful!

this[_fetchCheck](key);
const data = this.get(key);
this[_check](key, 'Array', path);
const data = super.get(key);
if (!isNil(path)) {

@@ -573,3 +573,3 @@ const propValue = _get(data, path);

if (this.ensureProps) this.ensure(key, {});
if (!super.has(key)) throw new Err(`Key "${key}" does not exist in "${this.name}" to ensure a property`, 'EnmapKeyError');
if (!this.has(key)) throw new Err(`Key "${key}" does not exist in "${this.name}" to ensure a property`, 'EnmapKeyError');
if (this.hasProp(key, path)) return this.getProp(key, path);

@@ -579,10 +579,10 @@ this.set(key, defaultValue, path);

}
if (this.ensureProps && isObject(super.get(key))) {
if (this.ensureProps && isObject(this.get(key))) {
if (!isObject(clonedValue)) throw new Err(`Default value for "${key}" in enmap "${this.name}" must be an object when merging with an object value.`, 'EnmapArgumentError');
// const merged = Object.assign(clonedValue, super.get(key));
const merged = merge(clonedValue, super.get(key));
const merged = merge(clonedValue, this.get(key));
super.set(key, merged);
return merged;
}
if (super.has(key)) return super.get(key);
if (this.has(key)) return this.get(key);
this.set(key, clonedValue);

@@ -613,3 +613,3 @@ return clonedValue;

this[_check](key, 'Object');
const data = super.get(key);
const data = this.get(key);
return _has(data, path);

@@ -647,3 +647,3 @@ }

this[_check](key, ['Array', 'Object']);
const data = super.get(key);
const data = this.get(key);
if (!isNil(path)) {

@@ -650,0 +650,0 @@ const propValue = _get(data, path);

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