calculate-from-index-x
Advanced tools
Comparing version 1.0.0 to 1.0.1
11
index.js
@@ -25,12 +25,3 @@ /** | ||
var index = toInteger(fromIndex); | ||
if (index < length) { | ||
if (index < 0) { | ||
index = length - Math.abs(index); | ||
if (index < 0) { | ||
index = 0; | ||
} | ||
} | ||
} | ||
return index; | ||
return index >= 0 ? index : Math.max(0, length + index); | ||
}; | ||
@@ -37,0 +28,0 @@ |
{ | ||
"name": "calculate-from-index-x", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Calculates a fromIndex of a given value for an array.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/Xotic750/calculate-from-index-x", |
@@ -62,2 +62,3 @@ 'use strict'; | ||
Infinity, | ||
NaN, | ||
void 0, | ||
@@ -80,2 +81,3 @@ null, | ||
0, | ||
0, | ||
10, | ||
@@ -116,2 +118,3 @@ 0, | ||
Infinity, | ||
NaN, | ||
void 0, | ||
@@ -118,0 +121,0 @@ null, |
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
94228
1726