babel-promisify
Converts callback-based functions to Babel or Native Promises. This module is babel port of es6-promisify.
Install
Install with npm
npm install --save babel-promisify
Example
"use strict"; // Declare variablesvar promisify = fs = // Convert the stat function stat = ; // Now usable as a promise!;
Provide your own callback
"use strict"; // Declare variablesvar promisify = fs = stat; // Convert the stat function, with a custom callbackstat = ; ;
Promisify methods
"use strict"; // Declare variablesvar promisify = redis = // Create a promise-based version of send_command client = ; // Send commands to redis and get a promise back;
Tests
Test with mocha & chai
$ npm test
Published under the MIT License.