synchronized-array-shuffle

0.1.0 • Public • Published

synchronized-array-shuffle

Shuffle multiple arrays randomly and keep them synchnorized.

Install & Usage

On the command line:

npm install synchronized-array-shuffle

In your file:

import synchronizedShuffle from 'synchronized-array-shuffle';
 
const A = ['a', 'b', 'c'];
const B = ['1', '2', '3'];
 
const [ A_shuffled, B_shuffled ] = synchronizedShuffle([ A, B ]);
 
// possible output
console.log(A_shuffled);
// ['c', 'a', 'b']
console.log(B_shuffled);
// ['3', '1', '2']

Package Sidebar

Install

npm i synchronized-array-shuffle

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • rwieruch