# listify

> Turn an array into a list of comma-separated values, appropriate for use in an English sentence.

Latest version **1.0.3** (published 2020-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install listify
pnpm add listify
yarn add listify
bun add listify
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-05-03 |
| First published | 2013-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/listify) |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 0 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | list, listify, array, comma, comma-separated, csv, oxford comma |

## Links

- npm: https://www.npmjs.com/package/listify
- Repository: https://github.com/ljharb/listify
- Homepage: https://github.com/ljharb/listify#readme
- Issues: https://github.com/ljharb/listify/issues
- Funding: https://github.com/sponsors/ljharb
- npm.io page: https://npm.io/package/listify

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2020-05-03
- 1.0.2 — 2020-05-01
- 1.0.1 — 2020-04-12
- 1.0.0 — 2014-08-13
- 0.0.1 — 2013-09-07

## README

#listify <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>

[![Build Status][travis-svg]][travis-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]

Turn an array into a list of comma-separated values, appropriate for use in an English sentence.

## Example

```js
var listify = require('listify');

assert(listify([1, 2]) === '1 and 2');
assert(listify([1, 2, 3]) === '1, 2, and 3');
assert(listify([1, 2, 3, 4]) === '1, 2, 3, and 4');
assert(listify([1, 2, 3], { separator: '… ' }) === '1… 2… and 3');
assert(listify([1, 2, 3], { finalWord: false }) === '1, 2, 3');
assert(listify([1, 2, 3], { separator: '… ', finalWord: 'or' }) === '1… 2… or 3');
```

## Tests
Simply clone the repo, `npm install`, and run `npm test`

[npm-url]: https://npmjs.org/package/listify
[npm-version-svg]: http://versionbadg.es/ljharb/listify.svg
[travis-svg]: https://travis-ci.org/ljharb/listify.svg
[travis-url]: https://travis-ci.org/ljharb/listify
[deps-svg]: https://david-dm.org/ljharb/listify.svg
[deps-url]: https://david-dm.org/ljharb/listify
[dev-deps-svg]: https://david-dm.org/ljharb/listify/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/listify#info=devDependencies

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