array-difference-linear

1.0.6 • Public • Published

array-difference-linear

Given array a and array b, returns a - b, all in linear time!

This requires node 4.x, as there are ES6 features added

How to use

array-difference takes two arguments, both of which must be arrays, and then returns an array of the difference


const arrayDifference = require('array-difference');

const a = [1,2,3];
const b = [2, 3, 4];

arrayDifference(a, b);
// -> [1]

Release History

  • Version 1.0.0: First release

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i array-difference-linear

    Weekly Downloads

    2

    Version

    1.0.6

    License

    ISC

    Last publish

    Collaborators

    • jlembeck