1.2.1 • Published 8 years ago

underscore.slice v1.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

underscore.slice (npm)

npm version npm.io Travis Coverage Status

:hammer: Plugin for Underscore.js: slice array to deep-levels array

Install

npm install underscore.slice

Usage

var _ = require('underscore');
var slice = require('underscore.slice');
_.mixin({ slice: slice });

var list = [1, 2, 3, 4, 5];
_.slice(list, 2); // [[1, 2], [3, 4], [5]]
_.slice(list, 4); // [[1, 2, 3, 4], [5]]

License

The MIT License @ 2014

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

9 years ago