Skip to content

Commit 53c1548

Browse files
Merge pull request then#62 from mkowaliszyn/master
Readme update: replace deprecated .from() with .resolve()
2 parents 7710d6d + 4fe07ad commit 53c1548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ Converts values and foreign promises into Promises/A+ promises. If you pass it
7474
Returns a promise for an array. If it is called with a single argument that `Array.isArray` then this returns a promise for a copy of that array with any promises replaced by their fulfilled values. Otherwise it returns a promise for an array that conatins its arguments, except with promises replaced by their resolution values. e.g.
7575

7676
```js
77-
Promise.all([Promise.from('a'), 'b', Promise.from('c')])
77+
Promise.all([Promise.resolve('a'), 'b', Promise.resolve('c')])
7878
.then(function (res) {
7979
assert(res[0] === 'a')
8080
assert(res[1] === 'b')
8181
assert(res[2] === 'c')
8282
})
8383

84-
Promise.all(Promise.from('a'), 'b', Promise.from('c'))
84+
Promise.all(Promise.resolve('a'), 'b', Promise.resolve('c'))
8585
.then(function (res) {
8686
assert(res[0] === 'a')
8787
assert(res[1] === 'b')

0 commit comments

Comments
 (0)