1.0.4 • Published 6 years ago

shufflefy v1.0.4

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

Build Status Coverage Status license

shufflefy

A Node.js package to shuffle an array.

Usage

Install the package using npm:

npm install shufflefy

Require the package:

const shufflefy = require('shufflefy');

Feed it with an array:

const numberArr = [1, 2, 3, 4, 5, 6, 7];
console.log(shufflefy(numberArr));

Arguments list:

shufflefy(input_arr[, iteration[, starting_seed[, randomizer]]])
  • input_arr - input array

  • iteration - number of iterations over the output array

  • starting_seed - same starting_seed and iteration combination would always generate the same result

  • randomizer - a function that takes in a seed(optional) and returns a number between 0 (inclusive) and 1 (exclusive)

Test:

npm test

Examples:

node example.js

Benchmarking:

node benchmark.js

License

MIT

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago