Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blork

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blork - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

1

lib/checkers.js

@@ -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";

2

package.json
{
"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)", () => {

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