# sorting-algos

> implementation of various sorting algorithms for browsers and node.js

Latest version **1.0.4** (published 2018-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install sorting-algos
pnpm add sorting-algos
yarn add sorting-algos
bun add sorting-algos
```

## 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.0.4 |
| Published | 2018-03-17 |
| First published | 2018-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | incessantmeraki |
| Maintainers | incessantmeraki |
| Keywords | sorting, algorithms, node.js, browsers |

## Links

- npm: https://www.npmjs.com/package/sorting-algos
- Repository: https://github.com/incessantmeraki/sorting-algos
- Homepage: https://github.com/incessantmeraki/sorting-algos#readme
- Issues: https://github.com/incessantmeraki/sorting-algos/issues
- npm.io page: https://npm.io/package/sorting-algos

## Dependencies (1)

- [priority-queues](https://npm.io/package/priority-queues.md) ^1.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2018-03-17
- 1.0.3 — 2018-03-17
- 1.0.2 — 2018-03-17
- 1.0.1 — 2018-03-17
- 1.0.0 — 2018-03-17

## README

# sorting-algos

implementation of various sorting algorithms in javascript

[![Build Status](https://travis-ci.org/incessantmeraki/sorting-algos.svg?branch=master)](https://travis-ci.org/incessantmeraki/sorting-algos)

## Usage

### Example

```js
  var {bubbleSort} = require('sorting-algos')
  var {selectionSort} = require('sorting-algos')
  var {insertionSort} = require('sorting-algos')
  var {heapSort} = require('sorting-algos')
  var {mergeSort} = require('sorting-algos')
  var {quickSort} = require('sorting-algos')

  var items = [35, 13, 44, 53, 1, 34, 51, 15, 88, 42]

  console.log(bubbleSort(items))
  console.log(selectionSort(items))
  console.log(insertionSort(items))
  console.log(heapSort(items))
  console.log(mergeSort(items))
  console.log(quickSort(items))
```

### API

#### `var {sorter} = require('sorting-algos')`
loads sorting algorithm where sorter can be *bubbleSort*, *selectionSort*, *insertionSort*, *heapSort*, *mergeSort* or *quickSort*

#### `sorter(items)`
sorts items in ascending order and returns it

## License

MIT

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