This commit is contained in:
Rico Sta. Cruz 2015-04-18 03:35:46 +08:00
parent 981819454a
commit 99660143ab
4 changed files with 17 additions and 9 deletions

View File

@ -49,7 +49,7 @@ Promise.join(
Use `.all`, `.any`, `.race`, or `.some`.
```js
Promise.all([ pro1, pro2 ])
Promise.all([ promise1, promise2 ])
.then(function (results) {
results[0]
results[1]
@ -57,7 +57,8 @@ Promise.all([ pro1, pro2 ])
// succeeds if one succeeds first
Promise.any(promises)
.then(...)
.then(function (result) {
})
```
### Object

View File

@ -36,12 +36,12 @@ var promises = [
// succeeds when all succeed
Promise.all(promises)
.then(function (values) {
.then(function (results) {
});
// succeeds when one finishes first
Promise.race(promises)
.then(function (value) {
.then(function (result) {
});
```

View File

@ -1,6 +1,11 @@
---
title: "Shell: named pipes"
layout: default
---
diff <(ls ./old) <(ls ./new)
```sh
diff <(ls ./old) <(ls ./new)
```
## References
* [Named pipe](https://en.wikipedia.org/wiki/Named_pipe) (wikipedia.org)

8
sh.md
View File

@ -1,5 +1,5 @@
---
title: Shell scripting (bash)
title: Bash scripting
layout: default
---
@ -233,5 +233,7 @@ or
while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do; case $1 in
esac; shift; done
* http://wiki.bash-hackers.org/
* http://wiki.bash-hackers.org/syntax/shellvars
## Reference
* [Bash-hackers wiki](http://wiki.bash-hackers.org/) (back-hackers.org)
* [Shell vars](http://wiki.bash-hackers.org/syntax/shellvars) (back-hackers.org)