lie-denodify
turn a node style callback into a promise based one
Last updated 6 years ago by cwmma .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lie-denodify 
SYNC missed versions from official npm registry.

lie-denodify Build Status

API

npm install lie-denodify
var denodify = require('lie-denodify');

###denodify

denodify(func, context[optional]);

takes as an argument a function which has a callback as it's last argument, returns a function that acts identically except it returns a promise instead of taking a callback and that arguments passed to the function may be promises as well

As a second argument it can take an object to call the function as a method of, if omitted calls it in the same context that the function was called (i.e. like normal).

License

MIT

Current Tags

  • 0.3.0                                ...           latest (6 years ago)

5 Versions

  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |