pipeline.macro

v1.1.0
🎣 A babel macro which works similarly to the pipeline operator.
babel-plugin-macros pipe pipeline composition

pipeline.macro

Babel Macro

A babel macro which works similarly to the pipeline operator.

Usage

import pipe from 'pipeline.macro'

const doubleSay = str => str + ', ' + str
const capitalize = str => str[0].toUpperCase() + str.substring(1)
const exclaim = str => str + '!'

const result = pipe(
  'hello',
  doubleSay,
  capitalize,
  exclaim,
)

result // "Hello, hello!"
npm i pipeline.macro

Metadata

  • MIT
  • Whatever
  • Mateusz BurzyÅ„ski
  • released 1/25/2019

Downloads

Maintainers