updated sys and created publi

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-21 18:09:49 +01:00
parent 2a6e2ff863
commit cefd1c2ad0
9509 changed files with 744901 additions and 32263 deletions
+33
View File
@@ -0,0 +1,33 @@
/*!
* array-slice <https://github.com/jonschlinkert/array-slice>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
module.exports = function slice(arr, start, end) {
var len = arr.length;
var range = [];
start = idx(len, start);
end = idx(len, end, len);
while (start < end) {
range.push(arr[start++]);
}
return range;
};
function idx(len, pos, end) {
if (pos == null) {
pos = end || 0;
} else if (pos < 0) {
pos = Math.max(len + pos, 0);
} else {
pos = Math.min(pos, len);
}
return pos;
}