array-shuffle

WebJar for array-shuffle

License

License

MIT
GroupId

GroupId

org.webjars.bowergithub.sindresorhus
ArtifactId

ArtifactId

array-shuffle
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

array-shuffle
WebJar for array-shuffle
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/array-shuffle

Download array-shuffle

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/array-shuffle/ -->
<dependency>
    <groupId>org.webjars.bowergithub.sindresorhus</groupId>
    <artifactId>array-shuffle</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/array-shuffle/
implementation 'org.webjars.bowergithub.sindresorhus:array-shuffle:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/array-shuffle/
implementation ("org.webjars.bowergithub.sindresorhus:array-shuffle:1.0.1")
'org.webjars.bowergithub.sindresorhus:array-shuffle:jar:1.0.1'
<dependency org="org.webjars.bowergithub.sindresorhus" name="array-shuffle" rev="1.0.1">
  <artifact name="array-shuffle" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.sindresorhus', module='array-shuffle', version='1.0.1')
)
libraryDependencies += "org.webjars.bowergithub.sindresorhus" % "array-shuffle" % "1.0.1"
[org.webjars.bowergithub.sindresorhus/array-shuffle "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

array-shuffle

Randomize the order of items in an array

Uses the Durstenfeld algorithm based on the Fisher–Yates algorithm.

Install

$ npm install array-shuffle

Usage

const shuffled = arrayShuffle([1, 2, 3, 4, 5, 6]);
//=> [3, 5, 4, 1, 2, 6]

API

arrayShuffle(array)

array

Type: array

The array to shuffle.

Versions

Version
1.0.1