Comparing version 1.1.9 to 1.1.10
@@ -65,5 +65,7 @@ "use strict"; | ||
// End safeguard | ||
return str && bson_1.ObjectID.isValid(str) | ||
? bson_1.ObjectID.createFromHexString(str) | ||
: null; | ||
if (typeof str !== "string") | ||
return null; | ||
if (!bson_1.ObjectID.isValid(str)) | ||
throw new Error("Invalid hex value <" + str + "> passed to idify"); | ||
return bson_1.ObjectID.createFromHexString(str); | ||
} | ||
@@ -70,0 +72,0 @@ exports.idify = idify; |
{ | ||
"name": "minimonk", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "A tiny wrapper around monk", | ||
@@ -5,0 +5,0 @@ "main": "lib/minimonk.js", |
@@ -58,5 +58,6 @@ import monk, { ICollection, IMonkManager } from "monk"; | ||
// End safeguard | ||
return str && ObjectID.isValid(str) | ||
? ObjectID.createFromHexString(str) | ||
: null; | ||
if (typeof str !== "string") return null; | ||
if (!ObjectID.isValid(str)) | ||
throw new Error(`Invalid hex value <${str}> passed to idify`); | ||
return ObjectID.createFromHexString(str); | ||
} | ||
@@ -63,0 +64,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19085
463