Extension for Vow to work with nodejs-style callbacks
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package.json

README.md

vow-node NPM version Build Status

Vow-node is a small extension for vow to work with nodejs-style callbacks

Getting Started

###In Node.js### You can install using Node Package Manager (npm):

npm install vow-node

API

####promisify(fn)#### Transforms given function fn to a function that returns promise.

var fs = require('fs'),
    readFile = vowNode.promisify(fs.readFile);

readFile('package.json').then(function(content) {
    console.log(content);
});

####invoke(fn, ...args)#### Invokes given function fn with arguments args.

var fs = require('fs');

vowNode.invoke(fs.readFile, 'package.json').then(function(content) {
    console.log(content);
});