c8856a27789957b626c35e4b439d63c9084d5189
[platform/framework/web/crosswalk-tizen.git] /
1 define(function () {
2
3     /**
4      * Returns a function that will execute a list of functions in sequence
5      * passing the same arguments to each one. (useful for batch processing
6      * items during a forEach loop)
7      */
8     function series(){
9         var fns = arguments;
10         return function(){
11             var i = 0,
12                 n = fns.length;
13             while (i < n) {
14                 fns[i].apply(this, arguments);
15                 i += 1;
16             }
17         };
18     }
19
20     return series;
21
22 });