# longest-first

> Sorts items in descending order of length.

Latest version **1.0.0** (published 2018-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install longest-first
pnpm add longest-first
yarn add longest-first
bun add longest-first
```

## 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.0 |
| Published | 2018-02-03 |
| First published | 2018-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Lamansky |
| Maintainers | lamansky |
| Keywords | sort, array, length, bind operator |

## Links

- npm: https://www.npmjs.com/package/longest-first
- Repository: https://github.com/lamansky/longest-first
- Issues: https://github.com/lamansky/longest-first/issues
- npm.io page: https://npm.io/package/longest-first

## Dependencies (1)

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

## Recent versions

- 1.0.0 (latest) — 2018-02-03

## README

# longest-first

Sorts items in descending order of length.

## Installation

Requires [Node.js](https://nodejs.org/) 6.0.0 or above.

```bash
npm i longest-first
```

## API

The module exports a single function.

* **Parameter**: `items` (iterable): Values that should be sorted by their `length` property. (The original iterable is not modified.)
* **Return Value**: Array

## Example

```javascript
const longestFirst = require('longest-first')

longestFirst(['one', 'two', 'three']) // ['three', 'one', 'two']

// Supports the bind operator
['test', 'example']::longestFirst() // ['example', 'test']
```

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