@balena/sbvr-types
Advanced tools
Comparing version 4.0.0 to 4.0.1-build-optimize-boolean-validate-5ba948cd5f42844974d43dc19f1c371e56376fc8-1
@@ -7,2 +7,7 @@ # Change Log | ||
# v4.0.1 | ||
## (2023-05-02) | ||
* boolean: Avoid unnecessary array creation to reduce GCs [Thodoris Greasidis] | ||
# v4.0.0 | ||
@@ -9,0 +14,0 @@ ## (2023-04-26) |
@@ -19,3 +19,3 @@ "use strict"; | ||
const value = Number(originalValue); | ||
if (Number.isNaN(value) || ![0, 1].includes(value)) { | ||
if (value !== 0 && value !== 1) { | ||
throw new Error(`is not a boolean: ${JSON.stringify(originalValue)} (${typeof originalValue})`); | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "@balena/sbvr-types", | ||
"version": "4.0.0", | ||
"version": "4.0.1-build-optimize-boolean-validate-5ba948cd5f42844974d43dc19f1c371e56376fc8-1", | ||
"description": "SBVR type definitions.", | ||
@@ -57,4 +57,4 @@ "main": "out", | ||
"versionist": { | ||
"publishedAt": "2023-04-26T14:55:58.093Z" | ||
"publishedAt": "2023-05-02T09:44:46.264Z" | ||
} | ||
} |
@@ -25,3 +25,3 @@ import * as TypeUtils from '../type-utils'; | ||
const value = Number(originalValue); | ||
if (Number.isNaN(value) || ![0, 1].includes(value)) { | ||
if (value !== 0 && value !== 1) { | ||
throw new Error( | ||
@@ -28,0 +28,0 @@ `is not a boolean: ${JSON.stringify( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
115707
2