# gpc-remove-duplicates

> This GherKing Precompiler is responsible for having only a reasonable amount of tags and/or rows in each feature file.

Latest version **1.0.0** (published 2022-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gpc-remove-duplicates
pnpm add gpc-remove-duplicates
yarn add gpc-remove-duplicates
bun add gpc-remove-duplicates
```

## Health

**Score 40/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-01-28 |
| First published | 2019-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 4 |
| Unpacked size | 18.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | GherKing |
| Maintainers | szikszail, judit-nahaj, sorosz89 |
| Keywords | gherkin, gherking, precompiler, feature file |

## Links

- npm: https://www.npmjs.com/package/gpc-remove-duplicates
- Repository: https://github.com/gherking/gpc-remove-duplicates
- Homepage: https://github.com/gherking/gpc-remove-duplicates#readme
- Issues: https://github.com/gherking/gpc-remove-duplicates/issues
- npm.io page: https://npm.io/package/gpc-remove-duplicates

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ^4.3.1
- [gherking](https://npm.io/package/gherking.md) ^2.0.0
- [gherkin-ast](https://npm.io/package/gherkin-ast.md) ^3.2.1
- [object-set-type](https://npm.io/package/object-set-type.md) ^2.1.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-01-28
- 1.0.0-beta.2 (beta) — 2022-01-09
- 1.0.0-beta.1 — 2022-01-07
- 0.0.1 — 2019-11-03

## README

# gpc-remove-duplicates

![Downloads](https://img.shields.io/npm/dw/gpc-remove-duplicates?style=flat-square) ![Version@npm](https://img.shields.io/npm/v/gpc-remove-duplicates?label=version%40npm&style=flat-square) ![Version@git](https://img.shields.io/github/package-json/v/gherking/gpc-remove-duplicates/master?label=version%40git&style=flat-square) ![CI](https://img.shields.io/github/workflow/status/gherking/gpc-remove-duplicates/CI/master?label=ci&style=flat-square) ![Docs](https://img.shields.io/github/workflow/status/gherking/gpc-remove-duplicates/Docs/master?label=docs&style=flat-square)

## Usage

```javascript
'use strict';
const compiler = require('gherking');
const RemoveDuplicates = require('gpc-remove-duplicates');

let ast = await compiler.load('./features/src/login.feature');
ast = compiler.process(
    ast,
    new RemoveDuplicates({
        // config
    })
);
await compiler.save('./features/dist/login.feature', ast, {
    lineBreak: '\r\n'
});
```

```typescript
'use strict';
import {load, process, save} from "gherking";
import RemoveDuplicates from "gpc-remove-duplicates";

let ast = await load("./features/src/login.feature");
ast = process(
    ast,
    new RemoveDuplicates({
        // config
    })
);
await save('./featuresdist/login.feature', ast, {
    lineBreak: '\r\n'
});
```

The RemoveDuplicates precompiler is responsible for having only a reasonable amount of tags and/or rows in each feature file.

It can proceed with the following actions:
1. Removes tags from Rule/Scenario/ScenarioOutline/Examples which exists on parent (Feature/Rule/ScenarioOutline) too.
1. Removes duplicate tags from Feature/Rule/Scenario/ScearioOutline/Examples.
1. Removes duplicate rows from Examples and step DataTables.

## Configuration

RemoveDuplicateRows accepts the following configuration:

| Option | Type | Description | Default |
|:------:|:----:|:------------|:--------|
| `processTags` | `boolean` | It indicates whether the 1st and 2nd options should be applied. | `true` |
| `processRows` | `boolean` | It indicates whether the 3rd option should be applied. | `false` |

## Other

This package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:remove-duplicates` :

```shell
DEBUG=gpc:remove-duplicates* gherking ...
```

For detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-remove-duplicates/).

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