@bemoje/arr-shuffle

1.0.1 • Public • Published

@bemoje/arr-shuffle

Shuffle items in an array in-place. Runtime: O(n)

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/arr-shuffle
npm install --save @bemoje/arr-shuffle
npm install --save-dev @bemoje/arr-shuffle

Usage

import arrShuffle from '@bemoje/arr-shuffle'

arrShuffle([1, 2, 3])
//=> [2, 1, 3] - or some other random order

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

arrShuffle

Shuffle items in an array in-place. Runtime: O(n)

Parameters
  • arr Array The array to shuffle.
Returns

Array The shuffled array

Package Sidebar

Install

npm i @bemoje/arr-shuffle

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

7.76 kB

Total Files

5

Last publish

Collaborators

  • bemoje