augmented-array
Version:
Extends Array methods adding: - combine(array): Object - diff(array): Array - indexByKey(arrayOfObjects): objectOfObjects - intersect(array): Array - pluck(field): Array - range(elements): Array - range(begin, end): Array - subtract(array): Array
14 lines (13 loc) • 373 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
require("mocha");
const chai_1 = require("chai");
require(".");
const a = [1, 2, 3, 4];
const b = [3, 4, 5, 6];
const intersect = [3, 4];
describe('Array extension functions', () => {
it('intersection', () => {
(0, chai_1.expect)(a.intersect(b)).to.deep.equal(intersect);
});
});
;