dedupe-csv
Advanced tools
Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "dedupe-csv", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "A deduper for duplicated entries found on a CSV files", | ||
@@ -9,2 +9,3 @@ "author": "Alvaro Fernandez - Builtvisible", | ||
"types": "./lib/index.d.ts", | ||
"preferGlobal": true, | ||
"bin": { | ||
@@ -11,0 +12,0 @@ "dedupe-csv": "./lib/index.js" |
@@ -46,10 +46,9 @@ [![dedupe-csv](https://github.com/alvaro-escalante/dedupe-csv/actions/workflows/build.yml/badge.svg)](https://github.com/alvaro-escalante/dedupe-csv/actions/workflows/build.yml) | ||
| ||
## Examples | ||
| ||
## Usage | ||
#### Remove duplicate lines | ||
| ||
This will remove any entries that are identical across all headers and keep the first entry found | ||
| ||
`$ dedupe-csv file="data.csv"` | ||
| ||
This will remove any entries that are identical across all headers and keep the first entry found<br /> | ||
```console | ||
$ dedupe-csv file="data.csv" | ||
``` | ||
##### data.csv | ||
@@ -61,5 +60,3 @@ ``` | ||
``` | ||
| ||
Will output the following file: | ||
| ||
##### data_deduped.csv | ||
@@ -70,9 +67,9 @@ ``` | ||
``` | ||
| ||
<br /> | ||
#### Remove duplicates by column name | ||
| ||
This will remove any entries that have the same duplicated column | ||
| ||
`$ dedupe-csv file="data.csv" column="brand"` | ||
| ||
This will remove any entries that have the same duplicated column<br /> | ||
```console | ||
$ dedupe-csv file="data.csv" column="brand" | ||
``` | ||
##### data-column.csv | ||
@@ -86,5 +83,3 @@ ``` | ||
``` | ||
| ||
Will output the following file: | ||
| ||
##### data-column_deduped.csv | ||
@@ -96,9 +91,9 @@ ``` | ||
``` | ||
| ||
<br /> | ||
#### Remove duplicates using multiple headers | ||
| ||
This will remove any entries that match the same duplicated columns. To use it, add columns between quotes and separated by commas. | ||
| ||
`$ dedupe-csv file="data-multiple.csv" column="brand,style"` | ||
| ||
This will remove any entries that match the same duplicated columns. To use it, add columns between quotes and separated by commas.<br /> | ||
```console | ||
$ dedupe-csv file="data-multiple.csv" column="brand,style" | ||
``` | ||
##### data-multiple.csv | ||
@@ -113,5 +108,3 @@ ``` | ||
``` | ||
| ||
Will output the following file: | ||
| ||
##### data-multiple_dedupe.csv | ||
@@ -124,10 +117,11 @@ ``` | ||
``` | ||
| ||
<br /> | ||
#### Remove duplicates by header and keep last | ||
This will remove any duplicated entries that match by column name and keep the last found | ||
| ||
To use add the option `keep="last"` | ||
| ||
`$ dedupe-csv file="data.csv" column="brand" keep="last"` | ||
| ||
To use add the option `keep="last"`<br /> | ||
```console | ||
$ dedupe-csv file="data.csv" column="brand" keep="last" | ||
``` | ||
##### data-last.csv | ||
@@ -141,5 +135,3 @@ ``` | ||
``` | ||
| ||
Will output the following file: | ||
| ||
##### data-last_deduped.csv | ||
@@ -146,0 +138,0 @@ ``` |
24989
135