vow-node

Extension for Vow to work with nodejs-style callbacks

4 个版本
安装
npm install vow-node
yarn add vow-node
pnpm add vow-node
bun add vow-node
README

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

版本列表
0.3.0 2015-04-23
0.2.1 2014-08-14
0.2.0 2014-01-27
0.1.0 2013-11-15