@petamoriken/float16
Advanced tools
Comparing version 3.1.0 to 3.1.1
/** | ||
* @petamoriken/float16 v3.1.0 | MIT License - https://git.io/float16 | ||
* @petamoriken/float16 v3.1.1 | MIT License - https://git.io/float16 | ||
* | ||
@@ -1641,3 +1641,3 @@ * @license | ||
const length = this.length; | ||
let from = ToIntegerOrInfinity(opts[0]); | ||
let from = opts.length >= 1 ? ToIntegerOrInfinity(opts[0]) : length - 1; | ||
@@ -1648,6 +1648,4 @@ if (from === -Infinity) { | ||
from = from === 0 ? length : from + 1; | ||
if (from >= 0) { | ||
from = from < length ? from : length; | ||
from = from < length - 1 ? from : length - 1; | ||
} else { | ||
@@ -1657,3 +1655,3 @@ from += length; | ||
for (let i = from; i--;) { | ||
for (let i = from; i >= 0; --i) { | ||
if (Object.prototype.hasOwnProperty.call(this, i) && convertToNumber(this[i]) === element) { | ||
@@ -1660,0 +1658,0 @@ return i; |
@@ -503,3 +503,3 @@ "use strict"; | ||
const length = this.length; | ||
let from = (0, _spec.ToIntegerOrInfinity)(opts[0]); | ||
let from = opts.length >= 1 ? (0, _spec.ToIntegerOrInfinity)(opts[0]) : length - 1; | ||
@@ -510,6 +510,4 @@ if (from === -Infinity) { | ||
from = from === 0 ? length : from + 1; | ||
if (from >= 0) { | ||
from = from < length ? from : length; | ||
from = from < length - 1 ? from : length - 1; | ||
} else { | ||
@@ -519,3 +517,3 @@ from += length; | ||
for (let i = from; i--;) { | ||
for (let i = from; i >= 0; --i) { | ||
if (Object.prototype.hasOwnProperty.call(this, i) && (0, _lib.convertToNumber)(this[i]) === element) { | ||
@@ -522,0 +520,0 @@ return i; |
{ | ||
"name": "@petamoriken/float16", | ||
"description": "half precision floating point for JavaScript", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "src/index.js", |
@@ -515,3 +515,3 @@ import memoize from "lodash-es/memoize"; | ||
let from = ToIntegerOrInfinity(opts[0]); | ||
let from = opts.length >= 1 ? ToIntegerOrInfinity(opts[0]) : length - 1; | ||
if (from === -Infinity) { | ||
@@ -521,6 +521,4 @@ return -1; | ||
from = from === 0 ? length : from + 1; | ||
if (from >= 0) { | ||
from = from < length ? from : length; | ||
from = from < length - 1 ? from : length - 1; | ||
} else { | ||
@@ -530,3 +528,3 @@ from += length; | ||
for(let i = from; i--;) { | ||
for(let i = from; i >= 0; --i) { | ||
if (Object.prototype.hasOwnProperty.call(this, i) && convertToNumber(this[i]) === element) { | ||
@@ -533,0 +531,0 @@ return i; |
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
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
114391
0
3149