@paulpopat/safe-type
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -18,12 +18,12 @@ export declare type IsType<T> = T extends (arg: any) => arg is infer T ? T : never; | ||
export declare function IsArray<T>(checker: Checker<T>): Checker<T[]>; | ||
export declare function IsDiscriminated<T1>(c1: Checker<T1>): Checker<T1>; | ||
export declare function IsDiscriminated<T1, T2>(c1: Checker<T1>, c2: Checker<T2>): Checker<T1 | T2>; | ||
export declare function IsDiscriminated<T1, T2, T3>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>): Checker<T1 | T2 | T3>; | ||
export declare function IsDiscriminated<T1, T2, T3, T4>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>): Checker<T1 | T2 | T3 | T4>; | ||
export declare function IsDiscriminated<T1, T2, T3, T4, T5>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>, c5: Checker<T5>): Checker<T1 | T2 | T3 | T4 | T5>; | ||
export declare function IsUnion<T1>(c1: Checker<T1>): Checker<T1>; | ||
export declare function IsUnion<T1, T2>(c1: Checker<T1>, c2: Checker<T2>): Checker<T1 & T2>; | ||
export declare function IsUnion<T1, T2, T3>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>): Checker<T1 & T2 & T3>; | ||
export declare function IsUnion<T1, T2, T3, T4>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>): Checker<T1 & T2 & T3 & T4>; | ||
export declare function IsUnion<T1, T2, T3, T4, T5>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>, c5: Checker<T5>): Checker<T1 & T2 & T3 & T4 & T5>; | ||
export declare function IsUnion<T1, T2>(c1: Checker<T1>, c2: Checker<T2>): Checker<T1 | T2>; | ||
export declare function IsUnion<T1, T2, T3>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>): Checker<T1 | T2 | T3>; | ||
export declare function IsUnion<T1, T2, T3, T4>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>): Checker<T1 | T2 | T3 | T4>; | ||
export declare function IsUnion<T1, T2, T3, T4, T5>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>, c5: Checker<T5>): Checker<T1 | T2 | T3 | T4 | T5>; | ||
export declare function IsIntersection<T1>(c1: Checker<T1>): Checker<T1>; | ||
export declare function IsIntersection<T1, T2>(c1: Checker<T1>, c2: Checker<T2>): Checker<T1 & T2>; | ||
export declare function IsIntersection<T1, T2, T3>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>): Checker<T1 & T2 & T3>; | ||
export declare function IsIntersection<T1, T2, T3, T4>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>): Checker<T1 & T2 & T3 & T4>; | ||
export declare function IsIntersection<T1, T2, T3, T4, T5>(c1: Checker<T1>, c2: Checker<T2>, c3: Checker<T3>, c4: Checker<T4>, c5: Checker<T5>): Checker<T1 & T2 & T3 & T4 & T5>; | ||
export declare function IsObject<T extends CheckerObject>(checker: T): ObjectChecker<T>; | ||
@@ -30,0 +30,0 @@ export declare function IsDictionary<T>(c: Checker<T>): Checker<{ |
@@ -15,4 +15,4 @@ "use strict"; | ||
exports.IsArray = IsArray; | ||
exports.IsDiscriminated = IsDiscriminated; | ||
exports.IsUnion = IsUnion; | ||
exports.IsIntersection = IsIntersection; | ||
exports.IsObject = IsObject; | ||
@@ -77,3 +77,3 @@ exports.IsDictionary = IsDictionary; | ||
function IsDiscriminated() { | ||
function IsUnion() { | ||
for (var _len = arguments.length, checkers = new Array(_len), _key = 0; _key < _len; _key++) { | ||
@@ -90,3 +90,3 @@ checkers[_key] = arguments[_key]; | ||
function IsUnion() { | ||
function IsIntersection() { | ||
for (var _len2 = arguments.length, checkers = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
@@ -136,3 +136,3 @@ checkers[_key2] = arguments[_key2]; | ||
for (var _key5 in arg) { | ||
if (arg.hasOwnProperty(_key5)) { | ||
if (!arg.hasOwnProperty(_key5)) { | ||
continue; | ||
@@ -163,2 +163,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJJc1N0cmluZyIsImFyZyIsIklzTnVtYmVyIiwiSXNCaWdJbnQiLCJJc1N5bWJvbCIsIklzQm9vbGVhbiIsIklzRnVuY3Rpb24iLCJJc0RhdGUiLCJEYXRlIiwiSXNMaXRlcmFsIiwidmFsdWUiLCJJc0FycmF5IiwiY2hlY2tlciIsIkFycmF5IiwiaXNBcnJheSIsImZpbmQiLCJhIiwiaSIsInJlc3VsdCIsIklzRGlzY3JpbWluYXRlZCIsImNoZWNrZXJzIiwiZmlsdGVyIiwiYyIsImxlbmd0aCIsIklzVW5pb24iLCJJc09iamVjdCIsInN0cmljdCIsImtleSIsImhhc093blByb3BlcnR5IiwiSXNEaWN0aW9uYXJ5IiwiT3B0aW9uYWwiLCJEb05vdENhcmUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBU08sU0FBU0EsUUFBVCxDQUFrQkMsR0FBbEIsRUFBMkM7QUFDaEQsU0FBTyxPQUFPQSxHQUFQLEtBQWUsUUFBdEI7QUFDRDs7QUFFTSxTQUFTQyxRQUFULENBQWtCRCxHQUFsQixFQUEyQztBQUNoRCxTQUFPLE9BQU9BLEdBQVAsS0FBZSxRQUF0QjtBQUNEOztBQUVNLFNBQVNFLFFBQVQsQ0FBa0JGLEdBQWxCLEVBQTJDO0FBQ2hELFNBQU8sT0FBT0EsR0FBUCxLQUFlLFFBQXRCO0FBQ0Q7O0FBRU0sU0FBU0csUUFBVCxDQUFrQkgsR0FBbEIsRUFBMkM7QUFDaEQsU0FBTyxRQUFPQSxHQUFQLE1BQWUsUUFBdEI7QUFDRDs7Q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yPFQ+KTogQ2hlY2tlcjx7IFtrZXk6IHN0cmluZ106IFQgfT4ge1xyXG4gIHJldHVybiAoYXJnOiBhbnkpOiBhcmcgaXMgeyBba2V5OiBzdHJpbmddOiBUIH0gPT4ge1xyXG4gICAgZm9yIChjb25zdCBrZXkgaW4gYXJnKSB7XHJcbiAgICAgIGlmIChhcmcuaGFzT3duUHJvcGVydHkoa2V5KSkge1xyXG4gICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAoIUlzU3RyaW5nKGtleSkpIHtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmICghYyhhcmdba2V5XSwgdHJ1ZSkpIHtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gdHJ1ZTtcclxuICB9O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gT3B0aW9uYWw8VD4oYzogQ2hlY2tlcjxUPik6IENoZWNrZXI8VCB8IG51bGwgfCB1bmRlZmluZWQ+IHtcclxuICByZXR1cm4gKGFyZzogYW55KTogYXJnIGlzIFQgfCBudWxsIHwgdW5kZWZpbmVkID0+IHtcclxuICAgIHJldHVybiB0eXBlb2YgYXJnID09PSBcInVuZGVmaW5lZFwiIHx8IGFyZyA9PT0gbnVsbCB8fCBjKGFyZywgdHJ1ZSk7XHJcbiAgfTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIERvTm90Q2FyZShhcmc6IGFueSk6IGFyZyBpcyB1bmtub3duIHtcclxuICByZXR1cm4gdHJ1ZTtcclxufVxyXG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJJc1N0cmluZyIsImFyZyIsIklzTnVtYmVyIiwiSXNCaWdJbn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ihcclxuICBjaGVja2VyOiBUXHJcbik6IE9iamVjdENoZWNrZXI8VD4ge1xyXG4gIHJldHVybiAoKGFyZzogYW55LCBzdHJpY3Q6IGJvb2xlYW4gPSB0cnVlKSA9PiB7XHJcbiAgICBmb3IgKGNvbnN0IGtleSBpbiBjaGVja2VyKSB7XHJcbiAgICAgIGlmICghY2hlY2tlci5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XHJcbiAgICAgICAgY29udGludWU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmICghY2hlY2tlcltrZXldKGFyZ1trZXldLCB0cnVlKSkge1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChzdHJpY3QpIHtcclxuICAgICAgZm9yIChjb25zdCBrZXkgaW4gYXJnKSB7XHJcbiAgICAgICAgaWYgKCFhcmcuaGFzT3duUHJvcGVydHkoa2V5KSkge1xyXG4gICAgICAgICAgY29udGludWU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoIWNoZWNrZXJba2V5XSkge1xyXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiB0cnVlO1xyXG4gIH0pIGFzIE9iamVjdENoZWNrZXI8VD47XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBJc0RpY3Rpb25hcnk8VD4oYzogQ2hlY2tlcjxUPik6IENoZWNrZXI8eyBba2V5OiBzdHJpbmddOiBUIH0+IHtcclxuICByZXR1cm4gKGFyZzogYW55KTogYXJnIGlzIHsgW2tleTogc3RyaW5nXTogVCB9ID0+IHtcclxuICAgIGZvciAoY29uc3Qga2V5IGluIGFyZykge1xyXG4gICAgICBpZiAoIWFyZy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XHJcbiAgICAgICAgY29udGludWU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmICghSXNTdHJpbmcoa2V5KSkge1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgaWYgKCFjKGFyZ1trZXldLCB0cnVlKSkge1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiB0cnVlO1xyXG4gIH07XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBPcHRpb25hbDxUPihjOiBDaGVja2VyPFQ+KTogQ2hlY2tlcjxUIHwgbnVsbCB8IHVuZGVmaW5lZD4ge1xyXG4gIHJldHVybiAoYXJnOiBhbnkpOiBhcmcgaXMgVCB8IG51bGwgfCB1bmRlZmluZWQgPT4ge1xyXG4gICAgcmV0dXJuIHR5cGVvZiBhcmcgPT09IFwidW5kZWZpbmVkXCIgfHwgYXJnID09PSBudWxsIHx8IGMoYXJnLCB0cnVlKTtcclxuICB9O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gRG9Ob3RDYXJlKGFyZzogYW55KTogYXJnIGlzIHVua25vd24ge1xyXG4gIHJldHVybiB0cnVlO1xyXG59XHJcbiJdfQ== |
@@ -6,10 +6,10 @@ "use strict"; | ||
// For now, we cannot test bigint as jest does not support it | ||
it.each([["IsString", "test string", _.IsString], ["IsNumber", 123, _.IsNumber], ["IsSymbol", Symbol(123), _.IsSymbol], ["IsBoolean", false, _.IsBoolean], ["IsFunction", function () {}, _.IsFunction], ["IsDate", new Date(2000, 1, 1), _.IsDate], ["IsLiteral", "Literal", (0, _.IsLiteral)("Literal")], ["IsArray of numbers", [1, 2, 3, 4], (0, _.IsArray)(_.IsNumber)], ["IsArray of strings", ["1", "2"], (0, _.IsArray)(_.IsString)], ["IsLiteral of Test or 123 p1", "Test", (0, _.IsDiscriminated)((0, _.IsLiteral)("Test"), (0, _.IsLiteral)(123))], ["IsLiteral of Test or 123 p2", 123, (0, _.IsDiscriminated)((0, _.IsLiteral)("Test"), (0, _.IsLiteral)(123))], ["IsObject with number", { | ||
it.each([["IsString", "test string", _.IsString], ["IsNumber", 123, _.IsNumber], ["IsSymbol", Symbol(123), _.IsSymbol], ["IsBoolean", false, _.IsBoolean], ["IsFunction", function () {}, _.IsFunction], ["IsDate", new Date(2000, 1, 1), _.IsDate], ["IsLiteral", "Literal", (0, _.IsLiteral)("Literal")], ["IsArray of numbers", [1, 2, 3, 4], (0, _.IsArray)(_.IsNumber)], ["IsArray of strings", ["1", "2"], (0, _.IsArray)(_.IsString)], ["IsUnion of Test or 123 p1", "Test", (0, _.IsUnion)((0, _.IsLiteral)("Test"), (0, _.IsLiteral)(123))], ["IsUnion of Test or 123 p2", 123, (0, _.IsUnion)((0, _.IsLiteral)("Test"), (0, _.IsLiteral)(123))], ["IsObject with number", { | ||
test: 123 | ||
}, (0, _.IsObject)({ | ||
test: _.IsNumber | ||
})], ["IsUnion", { | ||
})], ["IsIntersection", { | ||
test: 123, | ||
other: "test" | ||
}, (0, _.IsUnion)((0, _.IsObject)({ | ||
}, (0, _.IsIntersection)((0, _.IsObject)({ | ||
test: _.IsNumber | ||
@@ -24,2 +24,19 @@ }), (0, _.IsObject)({ | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50ZXN0LnRzIl0sIm5hbWVzIjpbIml0IiwiZWFjaCIsIklzU3RyaW5nIiwiSXNOdW1iZXIiLCJTeW1ib2wiLCJJc1N5bWJvbCIsIklzQm9vbGVhbiIsIklzRnVuY3Rpb24iLCJEYXRlIiwiSXNEYXRlIiwidGVzdCIsIm90aGVyIiwidW5kZWZpbmVkIiwiRG9Ob3RDYXJlIiwiVVRDIiwibmFtZSIsImRhdGEiLCJjaGVja2VyIiwiZXhwZWN0IiwidG9CZSJdLCJtYXBwaW5ncyI6Ijs7QUFBQTs7QUFpQkE7QUFDQUEsRUFBRSxDQUFDQyxJQUFILENB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4ge1xyXG4gICAgZXhwZWN0KGNoZWNrZXIoZGF0YSkpLnRvQmUodHJ1ZSk7XHJcbiAgfVxyXG4pO1xyXG4iXX0= | ||
it.each([["IsString", 123, _.IsString], ["IsNumber", "test string", _.IsNumber], ["IsSymbol", 123, _.IsSymbol], ["IsBoolean", 123, _.IsBoolean], ["IsFunction", 123, _.IsFunction], ["IsDate", 123, _.IsDate], ["IsLiteral", "No Literal", (0, _.IsLiteral)("Literal")], ["IsArray of numbers", ["1", "2"], (0, _.IsArray)(_.IsNumber)], ["IsArray of strings", [1, 2, 3, 4], (0, _.IsArray)(_.IsString)], ["IsUnion of Test or 123 p1", "Not a test", (0, _.IsUnion)((0, _.IsLiteral)("Test"), (0, _.IsLiteral)(123))], ["IsUnion of Test or 123 p2", 321, (0, _.IsUnion)((0, _.IsLiteral)("Test"), (0, _.IsLiteral)(123))], ["IsObject with number", { | ||
test: "test string" | ||
}, (0, _.IsObject)({ | ||
test: _.IsNumber | ||
})], ["IsIntersection", { | ||
test: "test string", | ||
other: 123 | ||
}, (0, _.IsIntersection)((0, _.IsObject)({ | ||
test: _.IsNumber | ||
}), (0, _.IsObject)({ | ||
other: _.IsString | ||
}))], ["IsDictionary of numbers", { | ||
test: "123", | ||
other: 321 | ||
}, (0, _.IsDictionary)(_.IsNumber)], ["Optional", false, (0, _.Optional)(_.IsNumber)]])("Correctly assignes to false for %s", function (name, data, checker) { | ||
expect(checker(data)).toBe(false); | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50ZXN0LnRzIl0sIm5hbWVzIjpbIml0IiwiZWFjaCIsIklzU3RyaW5nIiwiSXNOdW1iZXIiLCJTeW1ib2wiLCJJc1N5bWJvbCIsIklzQm9vbGVhbiIsIklzRnVuY3Rpb24iLCJEYXRlIiwiSXNEYXRlIiwidGVzdCIsIm90aGVyIiwidW5kZWZpbmVkIiwiRG9Ob3R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oSXNPYmplY3QoeyB0ZXN0OiBJc051bWJlciB9KSwgSXNPYmplY3QoeyBvdGhlcjogSXNTdHJpbmcgfSkpXHJcbiAgXSxcclxuICBbXHJcbiAgICBcIklzRGljdGlvbmFyeSBvZiBudW1iZXJzXCIsXHJcbiAgICB7IHRlc3Q6IFwiMTIzXCIsIG90aGVyOiAzMjEgfSxcclxuICAgIElzRGljdGlvbmFyeShJc051bWJlcilcclxuICBdLFxyXG4gIFtcIk9wdGlvbmFsXCIsIGZhbHNlLCBPcHRpb25hbChJc051bWJlcildXHJcbl0pKFxyXG4gIFwiQ29ycmVjdGx5IGFzc2lnbmVzIHRvIGZhbHNlIGZvciAlc1wiLFxyXG4gIChuYW1lOiBzdHJpbmcsIGRhdGE6IGFueSwgY2hlY2tlcjogYW55KSA9PiB7XHJcbiAgICBleHBlY3QoY2hlY2tlcihkYXRhKSkudG9CZShmYWxzZSk7XHJcbiAgfVxyXG4pO1xyXG4iXX0= |
{ | ||
"name": "@paulpopat/safe-type", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "JavaScript type safety with inference", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
36297
9
211