/flo-map

Flo map.

Primary LanguageJavaScript

flo-map

Build status Git tag NPM version Code style

Flo map.

Installation

$ npm install flo-map

Usage

import flo-map from 'flo-map'

let wacky = flo-map(wackify)

wacky(function * () {
  yield 'happy' // => 'wacky happy'
  yield ['dog', 'cat'] // => ['wacky dog', 'wacky cat']
})

function wackify (str) {
  return 'wacky ' + str
}

API

flo-map(..fns)

  • fns - functions to perform left to right composition over - composition is past "non-floables"

Returns: a unary function that takes an action - action can be "floable" or action to be processed by composition

License

MIT