@paulpopat/safe-type
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -89,2 +89,4 @@ "use strict"; | ||
if (strict === void 0) { strict = true; } | ||
if (!arg) | ||
return false; | ||
for (var key in checker) { | ||
@@ -91,0 +93,0 @@ if (!checker.hasOwnProperty(key)) { |
{ | ||
"name": "@paulpopat/safe-type", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Typesafety with strong inference", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -144,2 +144,14 @@ import { | ||
], | ||
[ | ||
"A deep object", | ||
{}, | ||
IsObject({ | ||
"@": IsObject({ | ||
"@_attr": IsUnion( | ||
IsObject({ on: IsString }), | ||
IsObject({ trigger: IsString, selector: IsString }) | ||
), | ||
}), | ||
}), | ||
], | ||
]) { | ||
@@ -146,0 +158,0 @@ it(`Correctly assignes to false for ${name}`, () => { |
@@ -93,2 +93,4 @@ export type IsType<T> = T extends (arg: any) => arg is infer T ? T : never; | ||
return ((arg: any, strict: boolean = true) => { | ||
if (!arg) return false; | ||
for (const key in checker) { | ||
@@ -95,0 +97,0 @@ if (!checker.hasOwnProperty(key)) { |
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
21986
598