1.0.2 • Published 3 years ago

ml-array-xy-filter-x v1.0.2

Weekly downloads
53
License
MIT
Repository
github
Last release
3 years ago

array-xy-filter-x

NPM version npm download

Sort a set of point based on the abscissas values.

Installation

$ npm install --save ml-array-xy-filter-x

Usage

import filterX from 'ml-array-xy-filter-x';

  const x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  const y = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
  const points = { x, y };

let result = filterX(points, {
    from: 2.5,
    to: 8.5,
    exclusions: [{ from: 2, to: 4.5 }, { from: 5.5, to: 8 }]
});

/* result -> {
    x: [5, 8],
    y: [6, 9]
} */

License

MIT

1.0.2

3 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1-security

5 years ago