🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

array-xy-centroids-merge

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-xy-centroids-merge

Merge abscissa values if the ordinate value is in a list of centroids

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

array-xy-centroids-merge

NPM version npm download

Merge abscissa values if the ordinate value is in a list of centroids.

Installation

$ npm install --save array-xy-ranges-merge

Usage

import mergeByCentroids from 'array-xy-centroids-merge';

const originalPoints = {
    x: [0.01, 1.008, 1.010, 1.012, 1.02, 1.04],
    y: [1, 1, 1, 1, 1, 1]
};

mergeByCentroids(originalPoints, [1.01, 1.04])

/* result -> {
    x: [1.01, 1.04],
    y: [3, 1]
} */

License

MIT

FAQs

Package last updated on 29 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts