[Pkg-javascript-commits] [node-async] 401/480: Merge pull request #391 from kvz/patch-1

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit 0eb81937b2409c1dfd4c128b14b4812d56ce8363
Merge: 9f57a35 93c536b
Author: Caolan McMahon <caolan.mcmahon at gmail.com>
Date:   Fri Mar 28 15:12:59 2014 +0000

    Merge pull request #391 from kvz/patch-1
    
    Passing an object to .series() may lead to unexpected behavior

 README.md | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --cc README.md
index 3249ed6,00f326b..94cea32
--- a/README.md
+++ b/README.md
@@@ -629,16 -583,25 +629,24 @@@ Same as [`concat`](#concat), but execut
  <a name="series" />
  ### series(tasks, [callback])
  
 -Run an array of functions in series, each one running once the previous
 +Run the functions in the `tasks` array in series, each one running once the previous
  function has completed. If any functions in the series pass an error to its
 -callback, no more functions are run and the callback for the series is
 -immediately called with the value of the error. Once the tasks have completed,
 -the results are passed to the final callback as an array.
 +callback, no more functions are run, and `callback` is immediately called with the value of the error. 
 +Otherwise, `callback` receives an array of results when `tasks` have completed.
  
  It is also possible to use an object instead of an array. Each property will be
 -run as a function and the results will be passed to the final callback as an object
 +run as a function, and the results will be passed to the final `callback` as an object
  instead of an array. This can be a more readable way of handling results from
 -async.series.
 +[`series`](#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__
  

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list