@julien76/js-simplify
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

This is a fork of simply-js with the following changes:

  • options to set the xKey and yKey for the points
  • use es6 syntax
  • Bundle the scripts with microbundle with UMD, module targer
  • Add calculation info in addition to return the simplified points
    const {
        simplifiedPoints,
        calculationInfo
        } = simplify(points, { highestQuality: true, tolerance: 3.0, xKey: 'x', yKey: 'y' })

calculationInfo returns:

{
    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

npm i @julien76/data-simplification

or

yarn add @julien76/data-simplification

Package Sidebar

Install

npm i @julien76/js-simplify

Weekly Downloads

0

Version

0.2.0

License

BSD-2-Clause

Unpacked Size

46.2 kB

Total Files

15

Last publish

Collaborators

  • julien76