# simple-matrix

> Simple matrix utility

Latest version **0.1.2** (published 2014-10-01) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2014-10-01 |
| First published | 2014-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Fei Liu |
| Maintainers | geastwood |
| Keywords | matrix, utility |

## Links

- npm: https://www.npmjs.com/package/simple-matrix
- Repository: https://github.com/geastwood/matrix
- Issues: https://github.com/geastwood/matrix/issues
- npm.io page: https://npm.io/package/simple-matrix

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2014-10-01
- 0.1.1 — 2014-09-30
- 0.1.0 — 2014-09-30

## README

Matrix methods wraps around Array

## install

* `bowser install simple-matrix`
* `npm install simple-matrix`

## how to use

* as mixin

    ```javascript
    var arr = [];
    Matrix(arr); // now `arr` is mixined with matrix methods
    ```
* as constructor

    ```javascript
    var matrix = new Matrix();
    ```

## available methods

* `matrix.row(m)` -> get the specified row
* `matrix.column(n)` -> get the specified column
* `matrix.position(m, n[, v])` -> get the specified column, optional `third` as `setter`
* `matrix.loop(fn)` -> loop throught the array, invoking `fn` on each item passing `m`, `n`, and `value`, `this` will be bind to matrix

## TODO
* [x] add loop method
* add slice&make???
* add dupicate

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