UNPKG

@eluvio/elv-js-helpers

Version:

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

17 lines (15 loc) 637 B
// AUTO-GENERATED TEST - DO NOT MODIFY, CHANGES WILL BE OVERWRITTEN DURING BUILD 'use strict' const TH = require('../../../test-helpers') const pipe = TH.requireSrcFile('Functional/pipe') describe('pipe JSDoc example', () => { it('should execute correctly as described', () => { 'use strict' // function has only one input, no need to curry const trim = str => str.trim() // function has only one input, not need to curry const capitalizeFirst = str => str.charAt(0).toUpperCase() + str.slice(1) const trimAndCapitalize = pipe(trim, capitalizeFirst) trimAndCapitalize(' foo ').should.eql('Foo') }) })