pipeline.macro
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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!"

Package Sidebar

Install

npm i pipeline.macro

Weekly Downloads

131

Version

1.1.0

License

MIT

Unpacked Size

4.82 kB

Total Files

4

Last publish

Collaborators

  • andarist