# @clarketm/superarray

> JavaScript Array with superpowers! 💪

Latest version **1.2.32** (published 2018-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @clarketm/superarray
pnpm add @clarketm/superarray
yarn add @clarketm/superarray
bun add @clarketm/superarray
```

## 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.2.32 |
| Published | 2018-11-26 |
| First published | 2018-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Travis Clarke |
| Maintainers | clarketm |
| Keywords | javascript, super, superpowers, Array, polyfill |

## Links

- npm: https://www.npmjs.com/package/@clarketm/superarray
- Homepage: https://github.com/clarketm/super/tree/master/packages/superarray#readme
- npm.io page: https://npm.io/package/@clarketm/superarray

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.2.32 (latest) — 2018-11-26
- 1.2.31 — 2018-07-26
- 1.2.30 — 2018-07-26
- 1.2.28 — 2018-07-23
- 1.2.27 — 2018-07-23
- 1.2.25 — 2018-07-22
- 1.2.20 — 2018-06-04
- 1.2.18 — 2018-05-22
- 1.2.17 — 2018-05-17
- 1.2.16 — 2018-05-17
- 1.2.15 — 2018-05-17
- 1.2.14 — 2018-05-17
- 1.2.13 — 2018-05-17
- 1.2.12 — 2018-05-17
- 1.2.11 — 2018-05-17
- … 10 more at https://npm.io/package/@clarketm/superarray/versions

## README

# [Array](https://www.npmjs.com/package/@clarketm/superarray)

[![NPM release](https://img.shields.io/npm/v/@clarketm/superarray.svg)](https://www.npmjs.com/package/@clarketm/superarray)

Array with superpowers! 💪

> This data structure inherit **all** methods and properties from the [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) built-in.

## Individual Module Installation

### Yarn

```bash
$ yarn add @clarketm/superarray
```

### Npm

```bash
$ npm install @clarketm/superarray --save
```

## API

### `constructor(iterable: Iterable)`

Construct a Array

### `flatMap(callback: Callback): Array`

Maps each element using a mapping function, then flattens the result into a new array

| Name     | Type     | Attribute | Description       |
| -------- | -------- | --------- | ----------------- |
| callback | Callback |           | callback function |

### `flat(depth: number): Array`

Creates a new array with all sub-array elements concatenated into it recursively up to the specified depth

| Name  | Type   | Attribute | Description   |
| ----- | ------ | --------- | ------------- |
| depth | number |           | flatten depth |

### `bubbleSort(comparator: Comparator): Array`

Sort using bubble sort

| Name       | Type       | Attribute | Description         |
| ---------- | ---------- | --------- | ------------------- |
| comparator | Comparator |           | comparator function |

### `insertionSort(comparator: Comparator): Array`

Sort using insertion sort

| Name       | Type       | Attribute | Description         |
| ---------- | ---------- | --------- | ------------------- |
| comparator | Comparator |           | comparator function |

### `mergeSort(comparator: Comparator): Array`

Sort using merge sort

| Name       | Type       | Attribute | Description         |
| ---------- | ---------- | --------- | ------------------- |
| comparator | Comparator |           | comparator function |

### `quickSort(comparator: Comparator): Array`

Sort using quick sort

| Name       | Type       | Attribute | Description         |
| ---------- | ---------- | --------- | ------------------- |
| comparator | Comparator |           | comparator function |

### `selectionSort(comparator: Comparator): Array`

Sort using selection sort

| Name       | Type       | Attribute | Description         |
| ---------- | ---------- | --------- | ------------------- |
| comparator | Comparator |           | comparator function |

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