Update
This commit is contained in:
parent
981819454a
commit
99660143ab
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -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
8
sh.md
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue