Sha256: 23d56c1359d190af0f10341a2f0a5548bceb0fe3ec31d30d5baae97e3adaf646
Contents?: true
Size: 709 Bytes
Versions: 69
Compression:
Stored size: 709 Bytes
Contents
define(function () { /** * Create slice of source array or array-like object */ function slice(arr, start, end){ var len = arr.length; if (start == null) { start = 0; } else if (start < 0) { start = Math.max(len + start, 0); } else { start = Math.min(start, len); } if (end == null) { end = len; } else if (end < 0) { end = Math.max(len + end, 0); } else { end = Math.min(end, len); } var result = []; while (start < end) { result.push(arr[start++]); } return result; } return slice; });
Version data entries
69 entries across 69 versions & 2 rubygems