# remove-duplicate-lines

> Removes duplicate lines from a given text source

Latest version **0.1.1** (published 2018-10-29) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install remove-duplicate-lines
pnpm add remove-duplicate-lines
yarn add remove-duplicate-lines
bun add remove-duplicate-lines
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2018-10-29 |
| First published | 2018-10-29 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jelmer de Maat |
| Maintainers | jelmer |
| Keywords | remove, duplicate, lines, deduplicate, double |

## Links

- npm: https://www.npmjs.com/package/remove-duplicate-lines
- npm.io page: https://npm.io/package/remove-duplicate-lines

## Recent versions

- 0.1.1 (latest) — 2018-10-29
- 0.1.0 — 2018-10-29

## README

# remove-duplicate-lines

[GitHub](https://github.com/jelmerdemaat/remove-duplicate-lines) | [NPM](https://www.npmjs.com/package/remove-duplicate-lines) | [@jelmerdemaat](https://twitter.com/jelmerdemaat)

Removes duplicate lines from a given input text.

## Usage

Install:

```bash
npm install remove-duplicate-lines
```

Use:

```js
const removeDuplicateLines = require('remove-duplicate-lines');

const example = `
	jelmer
	jelmer
	de
	maat
	testing123
	testing
	testing
	testing123
`;

removeDuplicateLines(example)
	.then(output => console.log(output))
	// Logs:
	// jelmer
	// de
	// maat
	// testing123
	// testing
	// testing123
	.catch(error => console.log(error))
	// Logs potential errors
```

## Arguments

`source` | _String_ | The input text (required)

`options` | _Boolean_ | An object containing options.

## Options

`unique` | _Boolean_ | Default: `false` | Allow every line only once in the entire text.

Pass options in an object as the seconds argument. Example:

```js
const example = `
	jelmer
	jelmer
	de
	maat
	testing123
	testing
	testing
	testing123
`;

removeDuplicateLines(example, { unique: true })
	.then(output => console.log(output))
	// Logs:
	// jelmer
	// de
	// maat
	// testing
	// testing123
	.catch(error => console.log(error))
	// Logs potential errors
```

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