# array-join-conjunction

> Join an array with a conjunction

Latest version **1.0.0** (published 2016-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-join-conjunction
pnpm add array-join-conjunction
yarn add array-join-conjunction
bun add array-join-conjunction
```

## 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 | 2016-01-31 |
| First published | 2016-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Dustin Specker |
| Maintainers | dustinspecker |
| Keywords | array, join, conjunction |

## Links

- npm: https://www.npmjs.com/package/array-join-conjunction
- Repository: https://github.com/dustinspecker/array-join-conjunction
- Homepage: https://github.com/dustinspecker/array-join-conjunction#readme
- Issues: https://github.com/dustinspecker/array-join-conjunction/issues
- npm.io page: https://npm.io/package/array-join-conjunction

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-01-31

## README

# array-join-conjunction

[![NPM version](https://badge.fury.io/js/array-join-conjunction.svg)](http://badge.fury.io/js/array-join-conjunction) [![Build Status](https://travis-ci.org/dustinspecker/array-join-conjunction.svg?branch=master)](https://travis-ci.org/dustinspecker/array-join-conjunction) [![Coverage Status](https://img.shields.io/coveralls/dustinspecker/array-join-conjunction.svg)](https://coveralls.io/r/dustinspecker/array-join-conjunction?branch=master)

[![Code Climate](https://codeclimate.com/github/dustinspecker/array-join-conjunction/badges/gpa.svg)](https://codeclimate.com/github/dustinspecker/array-join-conjunction) [![Dependencies](https://david-dm.org/dustinspecker/array-join-conjunction.svg)](https://david-dm.org/dustinspecker/array-join-conjunction/#info=dependencies&view=table) [![DevDependencies](https://david-dm.org/dustinspecker/array-join-conjunction/dev-status.svg)](https://david-dm.org/dustinspecker/array-join-conjunction/#info=devDependencies&view=table)

> Join an array with a conjunction

## Install

```bash
npm install --save array-join-conjunction
```

## Usage

```javascript
import arrayJoinConjuction from 'array-join-conjunction'

arrayJoinConjuction([])
// => ''

arrayJoinConjuction([1, 2])
// => '1 and 2'

arrayJoinConjuction(['blue', 'red', 'green'])
// => 'blue, red, and green'

arrayJoinConjuction(['blue', 'red', 'green'], 'or')
// => 'blue, red, or green'
```

## API
### arrayJoinConjuction(array, [conjunction])

Returns a `string` joined from `array` using an optional `conjunction`.

#### array
type: `array`

The array to join into a string. An empty array returns an empty string.

#### conjunction
type: `string`

default: `'and'`

A conjunction to join two or more words with. The default is to use `'and'`.

## License
MIT © [Dustin Specker](https://github.com/dustinspecker)

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