1.1.0 • Published 6 years ago

callbags v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Callbags

A helper to trim down the requiring of callbags.

const c = require('callbags')('pipe', 'interval', 'map', 'observe')

c.pipe(
  c.interval(1000),
  c.map(x => x * 1.5),
  c.observe(console.log)
)

This is the equivalent of

cont pipe = require('callbage-pipe')
cont interval = require('callbage-interval')
cont map = require('callbage-map')
cont observe = require('callbage-observe')

pipe(
  interval(1000),
  map(x => x * 1.5),
  observe(console.log)
)

Browser

callbags/transform is a browserify transform that lets you use callbags in the browser.

Using the browserify cli:

browserify entry.js -t callbags/transform

Using your package.json:

{
  "browserify": {
    "transform": [
      "callbags/transform"
    ]
  }
}
1.1.0

6 years ago

1.0.0

6 years ago