Comparing version 4.0.11 to 4.0.12
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ declare module 'enmap' { |
const Enmap = require('./src/index.js'); | ||
module.exports = Enmap; |
{ | ||
"name": "enmap", | ||
"version": "4.0.11", | ||
"version": "4.0.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ # Enmap - Enhanced Maps |
@@ -0,0 +0,0 @@ class CustomError extends Error { |
@@ -1,2 +0,1 @@ | ||
// Lodash should probably be a core lib but hey, it's useful! | ||
@@ -382,2 +381,3 @@ const _ = require('lodash'); | ||
this[_readyCheck](); | ||
this[_fetchCheck](key); | ||
this[_check](key, 'Array', path); | ||
@@ -409,2 +409,3 @@ const data = super.get(key); | ||
this[_readyCheck](); | ||
this[_fetchCheck](key); | ||
if (_.isNil(path)) throw new Err(`No path provided to push a value in "${key}" of enmap "${this.name}"`, 'EnmapPathError'); | ||
@@ -437,2 +438,3 @@ return this.push(key, val, path, allowDupes); | ||
this[_readyCheck](); | ||
this[_fetchCheck](key); | ||
this[_check](key, 'Number', path); | ||
@@ -698,2 +700,3 @@ if (_.isNil(path)) { | ||
this[_readyCheck](); | ||
this[_fetchCheck](key); | ||
if (_.isNil(path)) throw new Err(`No path provided to remove an array element in "${key}" of enmap "${this.name}"`, 'EnmapPathError'); | ||
@@ -859,3 +862,3 @@ return this.remove(key, val, path); | ||
[_fetchCheck](key, force = false) { | ||
if(force) { | ||
if (force) { | ||
this.fetch(key); | ||
@@ -862,0 +865,0 @@ return; |
Sorry, the diff of this file is not supported yet
83188
8
1613