1.0.6 • Published 6 years ago

puzzle-array v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

puzzle-array

Passing the array, return the array shuffled. Use Fisher-Yates algorithm.

Installation

npm

$ npm install puzzle-array

unpkg

<script src="https://unpkg.com/puzzle-array" type="text/javascript"></script>

Usage

let array = [0, 1, 2, 3, 4, 5]
array = puzzleArray(array)
console.log(array) // return: [3, 0, 5, 4, 1, 2]

License

MIT