promisify-node
promisify-node copied to clipboard
Wrap Node-callback functions to return Promises.
While this is convenient, it makes the library difficult to use with webpack and other bundlers.
``` var promisifyNode = require("promisify-node"); var fs = require("fs"); var util = require("util"); async function testOne(existsFn) { var prom = existsFn("test").catch(e => console.log("error " + e)); console.log("result " + await...
version 0.4.0 node v6.9.1 When I enter this code in the node REPL: ``` var promisify = require("promisify-node"); class C { constructor() { this.promisified_connect = promisify(this.connect); } connect(done) { if...
In relatively recent versions of Node, including the current LTS, object-assign and nodegit-promise are unnecessary. It'd be great if promisify-node didn't directly depend on polyfill (or polyfill-like in the case...
This is thrown from nodegit, which uses version 0.3.0 of promisify-node ``` TypeError: Cannot read property 'name' of null at processExports (C:\Users\username\.atom\packages\git-gui\node_modules\promisify-node\index.js:31:21) at processExports (C:\Users\username\.atom\packages\git-gui\node_modules\promisify-node\index.js:37:26) at processExports (C:\Users\username\.atom\packages\git-gui\node_modules\promisify-node\index.js:37:26) at processExports...
This appears to be caused by the fact that `fs` module is mutated by `promisify('fs')`. Internally, `fs.writeFile` uses some other `fs` methods in a callback fashion, so it expects `fs`...
From the docs: ``` fs.write(fd, buffer, offset, length[, position], callback) fs.write(fd, data[, position[, encoding]], callback) ``` By default the method signature is this: ``` js function (fd, buffer, offset, length,...
I wrote a library object using a CoffeeScript `class` and was not able to promisify it until I converted the code to just return a plain Object with the functions...
When I using gulp.wach to run tests (mocha) on each changes of the files, `nodegit` initialized without error only first time. I've created repo to reproduce this problem (see `README`...