UNPKG

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) 404 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("mocha"); const chai_1 = require("chai"); require("."); const keyList = ['a', 'b']; const valueList = ['a1', 'b1']; const combined = { a: 'a1', b: 'b1' }; describe('Array extension functions', () => { it('combine', () => { (0, chai_1.expect)(keyList.combine(valueList)).to.deep.equal(combined); }); });