This package has been deprecated

Author message:

use pify instead

@cfware/promisify-proxy

0.1.0 • Public • Published

@cfware/promisify-proxy

Travis CI NPM Version NPM Downloads MIT

ES6 Proxy object for promisifying selected members of an object.

Install @cfware/promisify-proxy

npm i --save @cfware/promisify-proxy

Usage

'use strict';

const promisifyProxy = require('@cfware/promisify-proxy');
const fs = promisifyProxy(require('fs'), ['stat']);

/* stat gets promisified. */
fs.stat('filename.txt')
	.then(console.log)
	.catch(console.error);

/* access does not get promisified. */
fs.access('filename.txt', err => {
	if (err) {
		console.error(err);
	} else {
		console.log('fs.access successful.');
	}
});

Running tests

Tests are provided by eslint and mocha.

npm install
npm test

Readme

Keywords

Package Sidebar

Install

npm i @cfware/promisify-proxy

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • coreyfarrell