@petamoriken/float16
Advanced tools
Comparing version 3.5.10 to 3.5.11
@@ -1,2 +0,2 @@ | ||
/*! @petamoriken/float16 v3.5.10 | MIT License - https://git.io/float16 */ | ||
/*! @petamoriken/float16 v3.5.11 | MIT License - https://git.io/float16 */ | ||
@@ -241,2 +241,3 @@ const float16 = (function (exports) { | ||
"Cannot mix BigInt and other types, use explicit conversions"; | ||
const ITERATOR_PROPERTY_IS_NOT_CALLABLE = "@@iterator property is not callable"; | ||
const REDUCE_OF_EMPTY_ARRAY_WITH_NO_INITIAL_VALUE = | ||
@@ -331,5 +332,2 @@ "Reduce of empty array with no initial value"; | ||
} | ||
function isIterable(value) { | ||
return value != null && typeof value[SymbolIterator] === "function"; | ||
} | ||
function isOrdinaryArray(value) { | ||
@@ -606,3 +604,7 @@ if (!ArrayIsArray(value)) { | ||
} else { | ||
if (isIterable(input)) { | ||
const iterator = input[SymbolIterator]; | ||
if (iterator != null && typeof iterator !== "function") { | ||
throw NativeTypeError(ITERATOR_PROPERTY_IS_NOT_CALLABLE); | ||
} | ||
if (iterator != null) { | ||
if (isOrdinaryArray(input)) { | ||
@@ -671,3 +673,7 @@ list = input; | ||
let length; | ||
if (isIterable(src)) { | ||
const iterator = src[SymbolIterator]; | ||
if (iterator != null && typeof iterator !== "function") { | ||
throw NativeTypeError(ITERATOR_PROPERTY_IS_NOT_CALLABLE); | ||
} | ||
if (iterator != null) { | ||
if (isOrdinaryArray(src)) { | ||
@@ -674,0 +680,0 @@ list = src; |
{ | ||
"name": "@petamoriken/float16", | ||
"version": "3.5.10", | ||
"version": "3.5.11", | ||
"description": "IEEE 754 half-precision floating-point for JavaScript", | ||
@@ -82,3 +82,3 @@ "keywords": [ | ||
"eslint": "^8.2.0", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jsdoc": "^37.0.3", | ||
@@ -85,0 +85,0 @@ "espower-cli": "^1.1.0", |
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
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
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
217663
5717