# shuffle-matrix

> Fisher-Yates for shuffle array and matrix

Latest version **1.1.1** (published 2017-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install shuffle-matrix
pnpm add shuffle-matrix
yarn add shuffle-matrix
bun add shuffle-matrix
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2017-06-04 |
| First published | 2017-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | chengxu1973 |
| Maintainers | chengxu1973 |
| Keywords | Fisher-Yates, Shuffle, Array, Matrix |

## Links

- npm: https://www.npmjs.com/package/shuffle-matrix
- Repository: https://github.com/ChengXu1973/shuffle-matrix
- Homepage: https://github.com/ChengXu1973/shuffle-matrix#readme
- Issues: https://github.com/ChengXu1973/shuffle-matrix/issues
- npm.io page: https://npm.io/package/shuffle-matrix

## Dependencies (1)

- [clone](https://npm.io/package/clone.md) ^2.1.1

## Recent versions

- 1.1.1 (latest) — 2017-06-04
- 1.1.0 — 2017-06-04
- 1.0.1 — 2017-06-02
- 1.0.0 — 2017-06-02

## README

# Shuffle-Matrix

[![npm](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/shuffle-matrix)

A JavaScript implementation of the Fisher-Yates Shuffle algorithm for array and matrix.

## Requirements

* Node.js 6+

## Installation

`npm install shuffle-matrix --save`

## Usage

```js
let shuffle = require('shuffle-matrix');
let origin = [1 , 2 , 3 , 4 , 5 , 6 ,  7 , 8 , 9];
let result = shuffle(origin);
```

```js
let randomFunc = function() {
    return 0.618
};
let shuffle = require('shuffle-matrix');
let origin = ['a', 'b', 'c', 'd', 'e', 'f'];
let result = shuffle(origin, randomFunc);
```

```js
let shuffle = require('shuffle-matrix');
let origin = [
    [0, 1],
    2,
    [3, 4, 5, 6, 7],
    [8, 9, 10],
    11,
    [12, 13]
];
let result = shuffle(origin);
```

---
_Source: https://npm.io/package/shuffle-matrix · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
