Comparing version 1.1.1 to 1.1.2
/** | ||
* Vars | ||
*/ | ||
var sliced = Array.prototype.slice | ||
/** | ||
* Expose slice | ||
*/ | ||
module.exports = slice['default'] = slice | ||
module.exports = slice | ||
@@ -18,3 +12,10 @@ /** | ||
function slice (array, begin, end) { | ||
return sliced.call(array, begin, end) | ||
begin = begin || 0 | ||
end = end || array.length | ||
var arr = new Array(array.length) | ||
for (var i = begin; i < end; ++i) { | ||
arr[i - begin] = array[i] | ||
} | ||
return arr | ||
} |
@@ -5,3 +5,3 @@ { | ||
"repository": "git://github.com/micro-js/slice.git", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "main": "lib/index.js", |
@@ -13,3 +13,2 @@ /** | ||
test('should slice arguments', function (t) { | ||
t.deepEqual(toArray(1, 2), [1, 2]) | ||
@@ -16,0 +15,0 @@ t.end() |
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
2346
35