shuffle-array-generator
v0.0.1
Published
generator a shuffle array
Downloads
5
Readme
shuffle-array-generator
generator a shuffle array
Install
$ npm i shuffle-array-generator
Example
import shuffle from './index'
let init = ['a', 'b', 'd', 'c', 'f', 'g', 'h']
shuffle(init) // => [ 'h', 'b', 'd', 'a', 'g', 'c', 'f' ]
init //=> ['a', 'b', 'd', 'c', 'f', 'g', 'h']
shuffle(3, 20) // => [ 14, 3, 15, 19, 18, 8, 5, 13, 6, 9, 16, 4, 17, 12, 7, 10, 11, 20 ]
API
shuffle([array, [begin, end]])
Parameters
- array return new shuffled array
- begin, end return shuffled array from begin to end
License
MIT