JSPM

puzzle-array

1.0.6
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q21367F
    • License MIT

    Responds to the shuffled array.

    Package Exports

    • puzzle-array

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (puzzle-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    puzzle-array

    Passing the array, return the array shuffled. Use Fisher-Yates algorithm.

    Installation

    npm

    $ npm install puzzle-array

    unpkg

    <script src="https://unpkg.com/puzzle-array" type="text/javascript"></script>

    Usage

    let array = [0, 1, 2, 3, 4, 5]
    array = puzzleArray(array)
    console.log(array) // return: [3, 0, 5, 4, 1, 2]

    License

    MIT