diff options
author | Kevin van Zonneveld <kevin@transloadit.com> | 2013-10-14 18:42:33 +0200 |
---|---|---|
committer | Kevin van Zonneveld <kevin@transloadit.com> | 2013-10-14 18:42:33 +0200 |
commit | 93c536b3abef27d08f4f6dc89edb93e338e3656d (patch) | |
tree | 041c017c7dbb83c0e09c51a677e23803f92609a6 | |
parent | d8601a17ab0bc6a1572227998b6e9182637f37b6 (diff) | |
download | async-93c536b3abef27d08f4f6dc89edb93e338e3656d.tar.gz |
Passing an object to .series() may lead to unexpected behavior
Just a friendly reminder for devs that pass an object to `series()`.
There are platforms that will execute the functions in seemingly
random order. If you or your testsuite rely on order of execution,
it's better to just use an array of functions.
-rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -594,6 +594,14 @@ run as a function and the results will be passed to the final callback as an obj instead of an array. This can be a more readable way of handling results from async.series. +**Note** that while many implementations preserve the order of object properties, the +[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) +explicitly states that + +> The mechanics and order of enumerating the properties is not specified. + +So if you rely on the order in which your series of functions are executed, and want +this to work on all platforms, consider using an array. __Arguments__ |