Miss any of our Open RFC calls?Watch the recordings here! »

callbox

1.0.0 • Public • Published

callbox

Simple encapsulation utility for your callback code.

Usage

var callbox = require('callbox')
var fs = require('fs')
 
async function main () {
  var result = await callbox(done => {
    fs.writeFile('hello', 'world', 'utf8', err => {
      if (err) return done(err)
      fs.readFile('hello', 'utf8', done)
    })
  })
 
  console.log(result) // 'world'
}
 
main()

License

Apache-2.0

Install

npm i callbox

DownloadsWeekly Downloads

2

Version

1.0.0

License

Apache-2.0

Unpacked Size

1.65 kB

Total Files

5

Last publish

Collaborators

  • avatar