open-index/open-npm huggingface dataset:
npm package: @julien76/js-simplify
Description: A fork of simplify-js for JavaScript 2D/3D polyline simplification library
Author: Julien Hericher
Latest version: 0.2.0


This is a fork of [simply-js](http://mourner.github.io/simplify-js/) with the following changes:

- options to set the xKey and yKey for the points
- use es6 syntax
- Bundle the scripts with [microbundle](https://github.com/developit/microbundle) with UMD, module targer
- Add calculation info in addition to return the simplified points

```js
    const {
        simplifiedPoints,
        calculationInfo
        } = simplify(points, { highestQuality: true, tolerance: 3.0, xKey: 'x', yKey: 'y' })
```

`calculationInfo` returns:

```js
{
    time: Number // time spent to compute in ms
    pointsBefore: Number // Number of points before the simplification
    pointsAfter: Number // Number of points after the simplification
    info: String // String containing the above info
}
```

## Installation

```bash
npm i @julien76/data-simplification
```
or

```bash
yarn add @julien76/data-simplification
```