Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ml-array-xy-filter-x

mljs691MIT1.0.2

Filter a XY array based on x values

readme

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

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

1.0.2 (2021-03-04)

Note: Version bump only for package ml-array-xy-filter-x

1.0.1 (2019-10-02)

Note: Version bump only for package ml-array-xy-filter-x

1.0.0 (2019-06-29)

chore

  • update dependencies and remove support for Node.js 6 (dc23f9c)

BREAKING CHANGES

  • Node.js 6 is no longer supported

0.0.5 (2019-05-08)

0.0.2 (2019-05-03)

Note: Version bump only for package ml-array-xy-filter-x

0.2.4 (2018-08-16)

Note: Version bump only for package ml-array-xy-sort-x

0.2.3 (2018-08-06)

Note: Version bump only for package ml-array-xy-sort-x

0.2.2 (2018-08-03)

Note: Version bump only for package ml-array-xy-sort-x

0.2.2 (2018-08-03)

Note: Version bump only for package ml-array-xy-sort-x

0.2.1 (2018-08-03)

Note: Version bump only for package ml-array-xy-sort-x

0.2.0 (2018-08-03)

Features

  • sortX: sort a list of points (38743e7)

0.1.0 (2017-10-07)

Features

  • sortX: sort a list of points (38743e7)