Comparing version 4.6.2 to 4.6.4
@@ -51,3 +51,4 @@ declare module "enmap" { | ||
*/ | ||
export default class Enmap<K extends string | number = string | number, V = any> extends AlmostMap<K, V> { | ||
export = Enmap; | ||
class Enmap<K extends string | number = string | number, V = any> extends AlmostMap<K, V> { | ||
public readonly cloneLevel: "none" | "shallow" | "deep"; | ||
@@ -54,0 +55,0 @@ public readonly name: string; |
{ | ||
"name": "enmap", | ||
"version": "4.6.2", | ||
"version": "4.6.4", | ||
"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", |
@@ -875,6 +875,6 @@ // Lodash should probably be a core lib but hey, it's useful! | ||
this[_check](key, 'Object'); | ||
const data = super.get(key); | ||
if (_.isNil(_.get(data, path))) { | ||
throw new Err(`The property "${path}" in key "${key}" does not exist. Please set() it or ensure() it."`, 'EnmapPathError'); | ||
} | ||
const data = super.get(key); | ||
if (!type.includes(_.get(data, path).constructor.name)) { | ||
@@ -881,0 +881,0 @@ throw new Err(`The property "${path}" in key "${key}" is not of type "${type.join('" or "')}" in the enmap "${this.name}" |
155108
2297