# FR-ZIP

fast french zip code search engine , based on laposte_hexasmal data

# new in v 1.1.0

by split data for each department and each first commune name letter , search time on byName() is divided by 10* (+- 19 ms on 'Brest' pattern search , was 200 ms in v1.0.1)

Weight of package is now about 46Mo decompressed , use fr-zip@1.0.1 if you want lighter package ()

## Installation

```bash
npm i fr-zip
```

## Usage

```js
var frZip = require('fr-zip')

// list all communes starts by 'bres'
frZip.byName('bres');

//list all commune for zip code or partial
frZip.byCode('29');
frZip.byCode('2920');

//list all communes using zip(two department first number) and name combination
frZip.byNameAndDepartment('st tho', '29');

```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
