UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

20 lines (19 loc) 606 B
import { filterRecord } from './filterRecord'; import { pipe } from './pipe'; describe('data first', function () { test('should filter', function () { expect(filterRecord({ a: 1, b: 2, c: 3 }, function (_a) { var k = _a[0], v = _a[1]; return k !== 'a'; })).toEqual({ b: 2, c: 3, }); }); test('should filter with pipe', function () { expect(pipe({ a: 1, b: 2, c: 3 }, filterRecord(function (_a) { var k = _a[0], v = _a[1]; return k !== 'a'; }))).toEqual({ b: 2, c: 3 }); }); });