vow-node
Extension for Vow to work with nodejs-style callbacks
Last updated 5 years ago by dfilatov .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vow-node 
SYNC missed versions from official npm registry.

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);
});

Current Tags

  • 0.3.0                                ...           latest (5 years ago)

4 Versions

  • 0.3.0                                ...           5 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           7 years ago

Copyright 2014 - 2016 © taobao.org |