# english-list

> make "X, Y, and Z"-style lists from arrays

Latest version **1.0.0** (published 2017-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install english-list
pnpm add english-list
yarn add english-list
bun add english-list
```

## 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 | 2017-08-10 |
| First published | 2015-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kyle E. Mitchell |
| Maintainers | kemitchell |
| Keywords | array, conjunction, English, enumeration, language, list, natural |

## Links

- npm: https://www.npmjs.com/package/english-list
- Repository: https://github.com/kemitchell/english-list.js
- Issues: https://github.com/kemitchell/english-list.js/issues
- npm.io page: https://npm.io/package/english-list

## Recent versions

- 1.0.0 (latest) — 2017-08-10
- 1.0.0-prerelease-1 — 2015-04-16

## README

Make "X, Y, and Z"-style lists from arrays.

```javascript
var list = require('english-list')
var assert = require('assert')

assert.equal(
  list('and', ['John']),
  'John'
)

assert.equal(
  list('and', ['John', 'Paul']),
  'John and Paul'
)

assert.equal(
  list('and', ['John', 'Paul', 'George']),
  'John, Paul, and George'
)

assert.equal(
  list('and', ['John', 'Paul', 'George'], false),
  'John, Paul and George'
)

assert.equal(
  list('and', ['John', 'Paul', 'George'], true),
  'John, Paul, and George'
)

assert.equal(
  list('or', ['John', 'Paul', 'George']),
  'John, Paul, or George'
)

assert.throws(function () {
  list('and', null)
}, TypeError)

assert.throws(function () {
  list('and', [])
}, Error)
```

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