# join-with-commas-and-and-before-the-last

> Join items with commas and "&" before the last item

Latest version **1.0.5** (published 2017-11-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install join-with-commas-and-and-before-the-last
pnpm add join-with-commas-and-and-before-the-last
yarn add join-with-commas-and-and-before-the-last
bun add join-with-commas-and-and-before-the-last
```

## 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.5 |
| Published | 2017-11-08 |
| First published | 2017-07-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Emran |
| Maintainers | xmanemran |
| Keywords | Array, Array, manipulation |

## Links

- npm: https://www.npmjs.com/package/join-with-commas-and-and-before-the-last
- Repository: https://github.com/xmanemran/join-with-commas-and-and-before-the-last
- Homepage: https://github.com/xmanemran/join-with-commas-and-and-before-the-last#readme
- Issues: https://github.com/xmanemran/join-with-commas-and-and-before-the-last/issues
- npm.io page: https://npm.io/package/join-with-commas-and-and-before-the-last

## Recent versions

- 1.0.5 (latest) — 2017-11-08
- 1.0.4 — 2017-10-30
- 1.0.3 — 2017-08-01
- 1.0.2 — 2017-08-01
- 1.0.1 — 2017-07-31
- 1.0.0 — 2017-07-31

## README

# Join items with commas and "&" before the last item

## Install
```
npm install join-with-commas-and-and-before-the-last --save
```

### Method

```
separate(array)
separate(array, "and") // last item join with 'and'. Default is '&'
```

### Example
```
var separate = require('join-with-commas-and-and-before-the-last').separate;

Separator.separate(["Emran", "Rayhan", "Mahmud"]);   // output will be "Emran, Rayhan & Mahmud"

Separator.separate(["Emran", "Rayhan"]);             // output will be "Emran & Rayhan"

Separator.separate(["Emran", "Rayhan"], ',');             // output will be "Emran, Rayhan"

Separator.separate(["Rayhan"]);                      // output will be "Rayhan"

Separator.separate(["Emran", "Rayhan", "Mahmud"], 'and');   // output will be "Emran, Rayhan and Mahmud"
```

---
_Source: https://npm.io/package/join-with-commas-and-and-before-the-last · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
