@sapphire/shapeshift
Advanced tools
Comparing version 1.0.0 to 1.0.1-next.3e083c0.0
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var SapphireShapeshift = (() => { | ||
@@ -7,2 +8,3 @@ var __defProp = Object.defineProperty; | ||
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
var __export = (target, all) => { | ||
@@ -85,2 +87,3 @@ for (var name in all) | ||
}; | ||
__name(BaseValidator, "BaseValidator"); | ||
@@ -102,2 +105,3 @@ // src/lib/errors/ValidationError.ts | ||
}; | ||
__name(ValidationError, "ValidationError"); | ||
@@ -132,2 +136,3 @@ // src/lib/Result.ts | ||
}; | ||
__name(Result, "Result"); | ||
@@ -159,2 +164,3 @@ // src/validators/ArrayValidator.ts | ||
}; | ||
__name(ArrayValidator, "ArrayValidator"); | ||
@@ -178,2 +184,3 @@ // src/lib/errors/ConstraintError.ts | ||
}; | ||
__name(ConstraintError, "ConstraintError"); | ||
@@ -184,17 +191,23 @@ // src/constraints/util/operators.ts | ||
} | ||
__name(lt, "lt"); | ||
function le(a, b) { | ||
return a <= b; | ||
} | ||
__name(le, "le"); | ||
function gt(a, b) { | ||
return a > b; | ||
} | ||
__name(gt, "gt"); | ||
function ge(a, b) { | ||
return a > b; | ||
} | ||
__name(ge, "ge"); | ||
function eq(a, b) { | ||
return a === b; | ||
} | ||
__name(eq, "eq"); | ||
function ne(a, b) { | ||
return a !== b; | ||
} | ||
__name(ne, "ne"); | ||
@@ -209,2 +222,3 @@ // src/constraints/BigIntConstraints.ts | ||
} | ||
__name(bigintComparator, "bigintComparator"); | ||
var bigintLt = bigintComparator.bind(null, lt, "bigintLt", (given, expected) => `Expected bigint to be less than ${expected}, but received ${given}`); | ||
@@ -247,2 +261,3 @@ var bigintLe = bigintComparator.bind(null, le, "bigintLe", (given, expected) => `Expected bigint to be less or equals than ${expected}, but received ${given}`); | ||
}; | ||
__name(BigIntValidator, "BigIntValidator"); | ||
@@ -279,2 +294,3 @@ // src/constraints/BooleanConstraints.ts | ||
}; | ||
__name(BooleanValidator, "BooleanValidator"); | ||
@@ -289,2 +305,3 @@ // src/constraints/DateConstraints.ts | ||
} | ||
__name(dateComparator, "dateComparator"); | ||
var dateLt = dateComparator.bind(null, lt, "dateLt", (given, expected) => `Expected date to be earlier than ${expected}, but received ${given}`); | ||
@@ -333,2 +350,3 @@ var dateLe = dateComparator.bind(null, le, "dateLe", (given, expected) => `Expected date to be earlier or equals than ${expected}, but received ${given}`); | ||
}; | ||
__name(DateValidator, "DateValidator"); | ||
@@ -350,2 +368,3 @@ // src/lib/errors/ExpectedValidationError.ts | ||
}; | ||
__name(ExpectedValidationError, "ExpectedValidationError"); | ||
@@ -365,2 +384,3 @@ // src/validators/InstanceValidator.ts | ||
}; | ||
__name(InstanceValidator, "InstanceValidator"); | ||
@@ -380,2 +400,3 @@ // src/validators/LiteralValidator.ts | ||
}; | ||
__name(LiteralValidator, "LiteralValidator"); | ||
@@ -388,2 +409,3 @@ // src/validators/NeverValidator.ts | ||
}; | ||
__name(NeverValidator, "NeverValidator"); | ||
@@ -396,2 +418,3 @@ // src/validators/NullishValidator.ts | ||
}; | ||
__name(NullishValidator, "NullishValidator"); | ||
@@ -406,2 +429,3 @@ // src/constraints/NumberConstraints.ts | ||
} | ||
__name(numberComparator, "numberComparator"); | ||
var numberLt = numberComparator.bind(null, lt, "numberLt", (given, expected) => `Expected number to be less than ${expected}, but received ${given}`); | ||
@@ -478,2 +502,3 @@ var numberLe = numberComparator.bind(null, le, "numberLe", (given, expected) => `Expected number to be less or equals than ${expected}, but received ${given}`); | ||
}; | ||
__name(NumberValidator, "NumberValidator"); | ||
@@ -493,2 +518,3 @@ // src/lib/errors/MissingPropertyError.ts | ||
}; | ||
__name(MissingPropertyError, "MissingPropertyError"); | ||
@@ -510,2 +536,3 @@ // src/lib/errors/UnknownPropertyError.ts | ||
}; | ||
__name(UnknownPropertyError, "UnknownPropertyError"); | ||
@@ -609,2 +636,3 @@ // src/validators/ObjectValidator.ts | ||
}; | ||
__name(ObjectValidator, "ObjectValidator"); | ||
var ObjectValidatorStrategy = /* @__PURE__ */ ((ObjectValidatorStrategy2) => { | ||
@@ -622,2 +650,3 @@ ObjectValidatorStrategy2[ObjectValidatorStrategy2["Ignore"] = 0] = "Ignore"; | ||
}; | ||
__name(PassthroughValidator, "PassthroughValidator"); | ||
@@ -649,2 +678,3 @@ // src/validators/SetValidator.ts | ||
}; | ||
__name(SetValidator, "SetValidator"); | ||
@@ -659,2 +689,3 @@ // src/constraints/StringConstraints.ts | ||
} | ||
__name(stringLength, "stringLength"); | ||
var stringLengthLt = stringLength.bind(null, lt, "stringLengthLt", (given, expected) => `Expected string to have less than ${expected} characters, but received one with ${given.length} characters`); | ||
@@ -691,2 +722,3 @@ var stringLengthLe = stringLength.bind(null, le, "stringLengthLe", (given, expected) => `Expected string to have maximum ${expected} characters, but received one with ${given.length} characters`); | ||
}; | ||
__name(StringValidator, "StringValidator"); | ||
@@ -755,2 +787,3 @@ // src/validators/UnionValidator.ts | ||
}; | ||
__name(UnionValidator, "UnionValidator"); | ||
@@ -816,2 +849,3 @@ // src/lib/Shapes.ts | ||
}; | ||
__name(Shapes, "Shapes"); | ||
@@ -818,0 +852,0 @@ // src/index.ts |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -6,2 +7,3 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
var __export = (target, all) => { | ||
@@ -84,2 +86,3 @@ for (var name in all) | ||
}; | ||
__name(BaseValidator, "BaseValidator"); | ||
@@ -101,2 +104,3 @@ // src/lib/errors/ValidationError.ts | ||
}; | ||
__name(ValidationError, "ValidationError"); | ||
@@ -131,2 +135,3 @@ // src/lib/Result.ts | ||
}; | ||
__name(Result, "Result"); | ||
@@ -158,2 +163,3 @@ // src/validators/ArrayValidator.ts | ||
}; | ||
__name(ArrayValidator, "ArrayValidator"); | ||
@@ -177,2 +183,3 @@ // src/lib/errors/ConstraintError.ts | ||
}; | ||
__name(ConstraintError, "ConstraintError"); | ||
@@ -183,17 +190,23 @@ // src/constraints/util/operators.ts | ||
} | ||
__name(lt, "lt"); | ||
function le(a, b) { | ||
return a <= b; | ||
} | ||
__name(le, "le"); | ||
function gt(a, b) { | ||
return a > b; | ||
} | ||
__name(gt, "gt"); | ||
function ge(a, b) { | ||
return a > b; | ||
} | ||
__name(ge, "ge"); | ||
function eq(a, b) { | ||
return a === b; | ||
} | ||
__name(eq, "eq"); | ||
function ne(a, b) { | ||
return a !== b; | ||
} | ||
__name(ne, "ne"); | ||
@@ -208,2 +221,3 @@ // src/constraints/BigIntConstraints.ts | ||
} | ||
__name(bigintComparator, "bigintComparator"); | ||
var bigintLt = bigintComparator.bind(null, lt, "bigintLt", (given, expected) => `Expected bigint to be less than ${expected}, but received ${given}`); | ||
@@ -246,2 +260,3 @@ var bigintLe = bigintComparator.bind(null, le, "bigintLe", (given, expected) => `Expected bigint to be less or equals than ${expected}, but received ${given}`); | ||
}; | ||
__name(BigIntValidator, "BigIntValidator"); | ||
@@ -278,2 +293,3 @@ // src/constraints/BooleanConstraints.ts | ||
}; | ||
__name(BooleanValidator, "BooleanValidator"); | ||
@@ -288,2 +304,3 @@ // src/constraints/DateConstraints.ts | ||
} | ||
__name(dateComparator, "dateComparator"); | ||
var dateLt = dateComparator.bind(null, lt, "dateLt", (given, expected) => `Expected date to be earlier than ${expected}, but received ${given}`); | ||
@@ -332,2 +349,3 @@ var dateLe = dateComparator.bind(null, le, "dateLe", (given, expected) => `Expected date to be earlier or equals than ${expected}, but received ${given}`); | ||
}; | ||
__name(DateValidator, "DateValidator"); | ||
@@ -349,2 +367,3 @@ // src/lib/errors/ExpectedValidationError.ts | ||
}; | ||
__name(ExpectedValidationError, "ExpectedValidationError"); | ||
@@ -364,2 +383,3 @@ // src/validators/InstanceValidator.ts | ||
}; | ||
__name(InstanceValidator, "InstanceValidator"); | ||
@@ -379,2 +399,3 @@ // src/validators/LiteralValidator.ts | ||
}; | ||
__name(LiteralValidator, "LiteralValidator"); | ||
@@ -387,2 +408,3 @@ // src/validators/NeverValidator.ts | ||
}; | ||
__name(NeverValidator, "NeverValidator"); | ||
@@ -395,2 +417,3 @@ // src/validators/NullishValidator.ts | ||
}; | ||
__name(NullishValidator, "NullishValidator"); | ||
@@ -405,2 +428,3 @@ // src/constraints/NumberConstraints.ts | ||
} | ||
__name(numberComparator, "numberComparator"); | ||
var numberLt = numberComparator.bind(null, lt, "numberLt", (given, expected) => `Expected number to be less than ${expected}, but received ${given}`); | ||
@@ -477,2 +501,3 @@ var numberLe = numberComparator.bind(null, le, "numberLe", (given, expected) => `Expected number to be less or equals than ${expected}, but received ${given}`); | ||
}; | ||
__name(NumberValidator, "NumberValidator"); | ||
@@ -492,2 +517,3 @@ // src/lib/errors/MissingPropertyError.ts | ||
}; | ||
__name(MissingPropertyError, "MissingPropertyError"); | ||
@@ -509,2 +535,3 @@ // src/lib/errors/UnknownPropertyError.ts | ||
}; | ||
__name(UnknownPropertyError, "UnknownPropertyError"); | ||
@@ -608,2 +635,3 @@ // src/validators/ObjectValidator.ts | ||
}; | ||
__name(ObjectValidator, "ObjectValidator"); | ||
var ObjectValidatorStrategy = /* @__PURE__ */ ((ObjectValidatorStrategy2) => { | ||
@@ -621,2 +649,3 @@ ObjectValidatorStrategy2[ObjectValidatorStrategy2["Ignore"] = 0] = "Ignore"; | ||
}; | ||
__name(PassthroughValidator, "PassthroughValidator"); | ||
@@ -648,2 +677,3 @@ // src/validators/SetValidator.ts | ||
}; | ||
__name(SetValidator, "SetValidator"); | ||
@@ -658,2 +688,3 @@ // src/constraints/StringConstraints.ts | ||
} | ||
__name(stringLength, "stringLength"); | ||
var stringLengthLt = stringLength.bind(null, lt, "stringLengthLt", (given, expected) => `Expected string to have less than ${expected} characters, but received one with ${given.length} characters`); | ||
@@ -690,2 +721,3 @@ var stringLengthLe = stringLength.bind(null, le, "stringLengthLe", (given, expected) => `Expected string to have maximum ${expected} characters, but received one with ${given.length} characters`); | ||
}; | ||
__name(StringValidator, "StringValidator"); | ||
@@ -754,2 +786,3 @@ // src/validators/UnionValidator.ts | ||
}; | ||
__name(UnionValidator, "UnionValidator"); | ||
@@ -815,2 +848,3 @@ // src/lib/Shapes.ts | ||
}; | ||
__name(Shapes, "Shapes"); | ||
@@ -817,0 +851,0 @@ // src/index.ts |
{ | ||
"name": "@sapphire/shapeshift", | ||
"version": "1.0.0", | ||
"version": "1.0.1-next.3e083c0.0", | ||
"description": "Blazing fast input validation and transformation ⚡", | ||
@@ -5,0 +5,0 @@ "author": "@sapphire", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
297552
2653
0
1
1