@andersaloof/sub-array
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -11,3 +11,3 @@ function subArray(items, current, range) { | ||
items.slice(Math.max(0, current - limitedRange), Math.min(items.length, current + limitedRange + 1)), | ||
current + limitedRange >= items.length ? items.slice(0, (current + limitedRange) - items.length + 1) : [], // Prepent items from the beginning of the array | ||
current + limitedRange >= items.length ? items.slice(0, (current + limitedRange) - items.length + 1) : [] // Prepend items from beginning of array | ||
); | ||
@@ -14,0 +14,0 @@ } |
{ | ||
"name": "@andersaloof/sub-array", | ||
"description": "Returns a subset of an array, from index + X items before/after the current index, wrapping around if range exceeds the bounds of the array.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
@@ -9,3 +9,3 @@ "browser": "index.js", | ||
"devDependencies": { | ||
"tape": "~4.9.1" | ||
"tape": "^5.0.1" | ||
}, | ||
@@ -12,0 +12,0 @@ "scripts": { |
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
6174