0.0.4 • Published 6 years ago
array-xy-unique-x v0.0.4
arrayxy-uniquex
Function to sum the y values if the x values are equals. The x array has to be ordered. It is an in place modification
Installation
npm i array-xy-unique-x
const uniqueX=require('array-xy-unique-x');
var x = [0, 0, 1, 2, 3, 3];
var y = [1, 2, 3, 4, 5, 6];
uniqueX({ x, y });
// x = [0, 1, 2, 3]
// y = [3, 3, 4, 11]
API Documentation
License
0.0.4
6 years ago