1.0.0 • Published 9 years ago
promiseproxy-node v1.0.0
Promisified Node.js API
PromiseProxy with a schema for the Node.js API.
Requirements
- Node.js 6+
Installation
npm install promiseproxy-nodeUsage
const PromiseProxyNode = require('promiseproxy-node')
// Supported modules: crypto, dns, fs, cluster, http, https, tls, dgram, zlib
const fs = PromiseProxyNode('fs')
// Callback-style still works
fs.chmod(path, mode, callback)
// Omitting the callback parameter returns a promise
fs.chmod(path, mode).then(callback)Build
npm run buildUpdating api.json
Use in console on each page of the Chrome API docs:
localStorage.methods = JSON.stringify([...new Set((localStorage.methods ? JSON.parse(localStorage.methods) : []).concat($$('#toc a').map(x => x.textContent).filter(x => /callback/.test(x))))])Copy contents of localStorage.methods to api.json.
Test
npm install --only=dev
npm run testLicense
MIT
1.0.0
9 years ago