aboutsummaryrefslogtreecommitdiff
path: root/node_modules/array-slice/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/array-slice/index.js')
-rwxr-xr-xnode_modules/array-slice/index.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/node_modules/array-slice/index.js b/node_modules/array-slice/index.js
index 6adb0b063..785fd0285 100755
--- a/node_modules/array-slice/index.js
+++ b/node_modules/array-slice/index.js
@@ -1,14 +1,14 @@
/*!
* array-slice <https://github.com/jonschlinkert/array-slice>
*
- * Copyright (c) 2014-2015, 2017, Jon Schlinkert.
- * Released under the MIT License.
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
*/
'use strict';
module.exports = function slice(arr, start, end) {
- var len = arr.length;
+ var len = arr.length >>> 0;
var range = [];
start = idx(arr, start);
@@ -20,8 +20,9 @@ module.exports = function slice(arr, start, end) {
return range;
};
+
function idx(arr, pos, end) {
- var len = arr.length;
+ var len = arr.length >>> 0;
if (pos == null) {
pos = end || 0;
@@ -32,4 +33,4 @@ function idx(arr, pos, end) {
}
return pos;
-}
+} \ No newline at end of file