fisher-yates-crypto

    0.0.3 • Public • Published

    fisher-yates-crypto

    Fisher-Yates Shuffle Implementation in JavaScript with default cryptographically strong random number generator. Designed to be a drop-in replacement for Math.random. Can be used with Node or in a browser.

    Requirements

    • NodeJS 6+

    Installation

    npm install fisher-yates-crypto --save

    Usage

    const shuffleCrypto = require('fisher-yates-crypto')
    const deck = ['A', 'B', 'C', 'D']
    const shuffledDeck = shuffleCrypto(deck)
    const randomizer = function() {
        return 0.6361052929345046
    };
    const shuffleCrypto = require('fisher-yates-crypto')
    const deck = ['A', 'B', 'C', 'D']
    const shuffledDeck = shuffleCrypto(deck, randomizer())

    Install

    npm i fisher-yates-crypto

    DownloadsWeekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    4.69 kB

    Total Files

    7

    Last publish

    Collaborators

    • technolog