bluebird: fix syntax highlight

This commit is contained in:
Rico Sta. Cruz 2017-09-08 07:23:19 +08:00
parent 3bcdc600cb
commit 0e086f1609
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 3 additions and 2 deletions

View File

@ -99,7 +99,7 @@ Promise.props({
``` ```
{: data-line="1"} {: data-line="1"}
Usually it's better to use `.join`, but whatever. Use [Promise.props](http://bluebirdjs.com/docs/api/promise.props.html).
### Chain of promises ### Chain of promises
@ -143,12 +143,13 @@ See [Promise.method](http://bluebirdjs.com/docs/api/promise.method.html).
### Generators ### Generators
``` ```js
User.login = Promise.coroutine(function* (email, password) { User.login = Promise.coroutine(function* (email, password) {
let user = yield User.find({email: email}).fetch() let user = yield User.find({email: email}).fetch()
return user return user
}) })
``` ```
{: data-line="1"}
See [Promise.coroutine](http://bluebirdjs.com/docs/api/promise.coroutine.html). See [Promise.coroutine](http://bluebirdjs.com/docs/api/promise.coroutine.html).