1.0.0-beta.6 • Published 5 years ago

endless-slice v1.0.0-beta.6

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

endless-slice

The slice method (Array.prototype.slice) but endless.

npm Build Status License

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.