@petamoriken/float16
Advanced tools
Comparing version 3.4.6 to 3.4.7
@@ -1,2 +0,2 @@ | ||
/*! @petamoriken/float16 v3.4.6 | MIT License - https://git.io/float16 */ | ||
/*! @petamoriken/float16 v3.4.7 | MIT License - https://git.io/float16 */ | ||
@@ -128,2 +128,6 @@ var float16 = (function (exports) { | ||
function hfround(num) { | ||
if (typeof num === "bigint") { | ||
throw TypeError("Cannot convert a BigInt value to a number"); | ||
} | ||
num = Number(num); | ||
@@ -161,2 +165,5 @@ | ||
/** | ||
* @see https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-object | ||
*/ | ||
const ArrayIteratorPrototype = Object.create(IteratorPrototype, { | ||
@@ -344,10 +351,2 @@ next: { | ||
if (number === Infinity) { | ||
return Infinity; | ||
} | ||
if (number === -Infinity) { | ||
return -Infinity; | ||
} | ||
return Math.trunc(number); | ||
@@ -354,0 +353,0 @@ } |
@@ -13,2 +13,6 @@ "use strict"; | ||
const IteratorPrototype = Reflect.getPrototypeOf(Reflect.getPrototypeOf([][Symbol.iterator]())); | ||
/** | ||
* @see https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-object | ||
*/ | ||
const ArrayIteratorPrototype = Object.create(IteratorPrototype, { | ||
@@ -15,0 +19,0 @@ next: { |
@@ -29,10 +29,2 @@ "use strict"; | ||
if (number === Infinity) { | ||
return Infinity; | ||
} | ||
if (number === -Infinity) { | ||
return -Infinity; | ||
} | ||
return Math.trunc(number); | ||
@@ -39,0 +31,0 @@ } |
@@ -16,2 +16,6 @@ "use strict"; | ||
function hfround(num) { | ||
if (typeof num === "bigint") { | ||
throw TypeError("Cannot convert a BigInt value to a number"); | ||
} | ||
num = Number(num); // for optimization | ||
@@ -18,0 +22,0 @@ |
{ | ||
"name": "@petamoriken/float16", | ||
"description": "half precision floating point for JavaScript", | ||
"version": "3.4.6", | ||
"version": "3.4.7", | ||
"main": "./lib/index.js", | ||
@@ -72,5 +72,5 @@ "module": "./src/index.mjs", | ||
"exorcist": "^2.0.0", | ||
"http-server": "^13.0.0", | ||
"http-server": "^13.0.2", | ||
"mocha": "^9.0.2", | ||
"nightwatch": "^1.6.4", | ||
"nightwatch": "^1.7.9", | ||
"nightwatch-saucelabs-endsauce": "^1.0.5", | ||
@@ -77,0 +77,0 @@ "nyc": "^15.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
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
169094