🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

type-error

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-error - npm Package Compare versions

Comparing version

to
1.0.2

@@ -11,2 +11,3 @@ const {toString} = Object.prototype;

return function TypeError(type, val) {
if (type === undefined) throw Error('Type cannot be undefined');
if (typeof type != 'string') type = ofType(type);

@@ -13,0 +14,0 @@ const err = _TypeError('Expected ' + type + ', got ' + typeOf(val));

{
"name": "type-error",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "aleclarson/type-error",

@@ -1,2 +0,2 @@

# type-error v1.0.1
# type-error v1.0.2

@@ -3,0 +3,0 @@ Create a native `TypeError` object by passing the expected type and the actual value.