Skip to content

🎣 A babel macro which works similarly to the pipeline operator.

Notifications You must be signed in to change notification settings

Andarist/pipeline.macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🎣 A babel macro which works similarly to the pipeline operator.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published