Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/austinleegordon/filter-zip-codes

Remove unwanted zip/postal codes from CSV and JSON data.
https://github.com/austinleegordon/filter-zip-codes

code csv filter json list postal remove zip

Last synced: 1 day ago
JSON representation

Remove unwanted zip/postal codes from CSV and JSON data.

Awesome Lists containing this project

README

        

# filter-zip-codes

[![Current npm package version](https://img.shields.io/npm/v/filter-zip-codes.svg)](https://www.npmjs.com/package/filter-zip-codes) [![Build Status](https://travis-ci.com/AustinLeeGordon/filter-zip-codes.svg?branch=master)](https://travis-ci.com/AustinLeeGordon/filter-zip-codes)

Keep or remove zip/postal codes from CSV and JSON data.

## Usage

```js
// From CSV
await filterZipCodes(
// Array of zip codes
[12345, 67890],
// Options
{
// Keep the zip codes provided (true) or remove them (false)
// Default: false
keep: false,
}
).fromCsv(csvString, headerString);

// From JSON
filterZipCodes(
[12345, 67890]
).fromJson(jsonString, keyString);
```

## License

MIT © [Austin Gordon](https://www.austinleegordon.com)