crypto-shuffle



A cryptographically secure shuffle using the modern
Fisher-Yates algorithm. The browser's (or Node.js) crypto services are used to generate strong random numbers; see
get-random-values for more details.
Getting started
crypto-shuffle is available for both Node.js and the browser. Most modern browsers are supported. If you want to know if your browser is compatible, run the
online test suite.
Install with
npm
> npm install crypto-shuffle --save
$3
Include the package and the shuffle a deck of cards
var shuffle = require('crypto-shuffle')
var deck = ["AS", "KS", "QS", "JS", "TS", "9S"]
shuffle(deck)
console.log(deck)
$3
Include the package from your project
Or better yet, from the
unpkg CDN
This will provide
shuffle as a global object, or
define it if you are using
AMD.