endless-slice
v1.0.0-beta.6
Published
The slice method (Array.prototype.slice) but endless.
Downloads
10
Maintainers
Readme
endless-slice
The slice method (Array.prototype.slice) but endless.
Instalation
npm add endless-slice
Usage
import slice from 'endless-slice';
const arr = [0, 1, 2, 3, 4, 5];
slice(arr); // => [0, 1, 2, 3, 4, 5]
slice(arr, 3); // => [3, 4, 5]
slice(arr, -2); // => [4, 5]
slice(arr, 2, 4); // => [2, 3]
slice(arr, -2, 2); // => [4, 5, 0, 1]
License
This project is licensed under Apache License, version 2.0.