0.1.1 • Published 9 years ago
slice-file-cli v0.1.1
slice-file-cli 
Generate a module that manually slices between a given range.
$ slice-file 0 5 > slice.jsconst slice = require('./slice')
slice([1, 2, 3, 4], 1)
// => [2, 3, 4]This generates a file that manually picks apart an array between a given range.
Reconsider if you want to use this, as I'm not sure it is a good practice... I just made this because I was bored.
Installation
$ npm install --save slice-file-cliUsage
slice-file start end
Generate a module that slices manually through the given range.
start: The starting index of the range where to slice manually.end: The ending index of the range.
Outputs the module via STDOUT.
$ slice-file 1 10 > slice.jsslice(input, [start])
The exported module's function.
input(Array): An array you want to slice.start(Number): The starting index.
slice([1, 2, 3, 4, 5, 6], 2)
// => [3, 4, 5, 6]License
MIT © Jamen Marz