-
Notifications
You must be signed in to change notification settings - Fork 230
Promise support #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise support #248
Conversation
| this._finalize(); | ||
| } | ||
|
|
||
| return this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return signature changes hence backward compatibility break
| return new Promise(function(resolve, reject) { | ||
| var errored; | ||
|
|
||
| self._module.on('end', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lmk if close is better here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum, that difference usually matters more for fs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not finish ?
| return this; | ||
| var self = this: | ||
|
|
||
| return new Promise(function(resolve, reject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of self we could use an arrow function (note sure node 4 supports it without the --harmony flag)
This is a breaking change.