Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_greim_
on Oct 2, 2014
|
parent
|
context
|
favorite
| on:
Bye Bye JavaScript Promises
Is this similar to the co utility? I've been using it to yield partially-applied node calls directly, no promises required.
var text = yield fs.readFile.bind(null, '/file.txt')
inglor
on Oct 2, 2014
[–]
Yes, it's similar, `Promise.coroutine` is faster and a stronger abstraction though, especially with `addYieldHandler`.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: