# @julien76/js-simplify

> A fork of simplify-js for JavaScript 2D/3D polyline simplification library

Latest version **0.2.0** (published 2020-05-23) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install @julien76/js-simplify
pnpm add @julien76/js-simplify
yarn add @julien76/js-simplify
bun add @julien76/js-simplify
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2020-05-23 |
| First published | 2020-05-22 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 45.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Julien Hericher |
| Maintainers | julien76 |
| Keywords | math, geometry, polyline, simplification |

## Links

- npm: https://www.npmjs.com/package/@julien76/js-simplify
- Repository: https://https://gitlab.com/Julien76/js-simplify
- npm.io page: https://npm.io/package/@julien76/js-simplify

## Dependencies (1)

- [curve-matcher](https://npm.io/package/curve-matcher.md) ^1.1.1

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2020-05-23
- 0.1.0 — 2020-05-22

## README

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
```

---
_Source: https://npm.io/package/@julien76/js-simplify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
