tsbuffer-validator
Advanced tools
Comparing version 0.4.2 to 0.4.3
{ | ||
"name": "tsbuffer-validator", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Validator for TSBuffer values", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,7 +12,7 @@ "use strict"; | ||
Int32Array: Int32Array, | ||
BigInt64Array: BigInt64Array, | ||
BigInt64Array: typeof BigInt64Array !== 'undefined' ? BigInt64Array : undefined, | ||
Uint8Array: Uint8Array, | ||
Uint16Array: Uint16Array, | ||
Uint32Array: Uint32Array, | ||
BigUint64Array: BigUint64Array, | ||
BigUint64Array: typeof BigUint64Array !== 'undefined' ? BigUint64Array : undefined, | ||
Float32Array: Float32Array, | ||
@@ -258,6 +258,7 @@ Float64Array: Float64Array | ||
if (schema.arrayType) { | ||
if (!typedArrays[schema.arrayType]) { | ||
var typeArrayClass = typedArrays[schema.arrayType]; | ||
if (!typeArrayClass) { | ||
throw new Error("Error TypedArray type: " + schema.arrayType); | ||
} | ||
return value instanceof typedArrays[schema.arrayType] ? ValidateResult_1.ValidateResult.success : ValidateResult_1.ValidateResult.error(ValidateResult_1.ValidateErrorCode.WrongType); | ||
return value instanceof typeArrayClass ? ValidateResult_1.ValidateResult.success : ValidateResult_1.ValidateResult.error(ValidateResult_1.ValidateErrorCode.WrongType); | ||
} | ||
@@ -264,0 +265,0 @@ else { |
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
55482
924