UNPKG

@eluvio/elv-js-helpers

Version:

A collection of Javascript helper functions used by several Eluvio libraries.

16 lines (14 loc) 561 B
// AUTO-GENERATED TEST - DO NOT MODIFY, CHANGES WILL BE OVERWRITTEN DURING BUILD 'use strict' const TH = require('../../../test-helpers') const times = TH.requireSrcFile('Functional/times') describe('times JSDoc example', () => { it('should execute correctly as described', () => { 'use strict' const double = x => x * 2 times(double, 3).should.eql([0, 2, 4]) // function is curried: call with just first param to obtain a more specialized function const getSquares = times(x => x ** 2) getSquares(4).should.eql([0, 1, 4, 9]) }) })