lizia-random-permutation

random permutation of a array, like lizia.

Usage no npm install needed!

<script type="module">
  import liziaRandomPermutation from 'https://cdn.skypack.dev/lizia-random-permutation';
</script>

README

Build Status

lizia-random-permutation

make a random permutation of a array given, like lizia.

Install

$ npm install lizia-random-permutation

Usage

const permutate  = require('lizia-random-permutation')
permutate([1,2,3,4,5]) // [3,2,1,5,4] random permuted

API Documentation permutation -> object

permutation(Array[,Number]) -> Array

The param is the array to be random permuted, the optional params is number of permutation to be done if is not given is taken from [30, 50] interval. The array is passed by reference.