Comparing version 3.0.0 to 3.1.0
@@ -78,1 +78,2 @@ // Primatives. | ||
exports["promise"] = v => v instanceof Promise || "Must be a promise"; | ||
exports["regex"] = exports["regexp"] = v => v instanceof RegExp || "Must be a regular expression"; |
{ | ||
"name": "blork", | ||
"description": "Blork! Mini runtime type checking in Javascript", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"license": "0BSD", | ||
@@ -6,0 +6,0 @@ "author": "Dave Houlbrooke <dave@shax.com>", |
@@ -88,2 +88,4 @@ const BlorkError = require("../lib/BlorkError"); | ||
expect(check(Promise.resolve(), "promise")).toBe(1); | ||
expect(check(/[abc]+/g, "regexp")).toBe(1); | ||
expect(check(/[abc]+/g, "regex")).toBe(1); | ||
}); | ||
@@ -171,2 +173,4 @@ test("Throw TypeError when checks fail (string format)", () => { | ||
expect(() => check(true, "promise")).toThrow(TypeError); | ||
expect(() => check("/[abc]+/g", "regexp")).toThrow(TypeError); | ||
expect(() => check("/[abc]+/g", "regex")).toThrow(TypeError); | ||
}); | ||
@@ -173,0 +177,0 @@ test("Return correctly when checks pass (optional string format)", () => { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
60681
883
0