No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

hace 3 años
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # async-each-series
  2. Apply an async function to each Array element in series
  3. [![Build Status](https://travis-ci.org/jb55/async-each-series.svg)](https://travis-ci.org/jb55/async-each-series)
  4. [![browser support](https://ci.testling.com/jb55/async-each-series.png)](https://ci.testling.com/jb55/async-each-series)
  5. ## Installation
  6. Install with [npm](https://www.npmjs.org):
  7. $ npm install async-each-series
  8. Install with [component(1)](http://component.io):
  9. $ component install jb55/async-each-series
  10. ## Examples
  11. ### Node.js
  12. ```javascript
  13. var each = require('async-each-series');
  14. each(['foo','bar','baz'], function(el, next) {
  15. setTimeout(function () {
  16. console.log(el);
  17. next();
  18. }, Math.random() * 5000);
  19. }, function (err) {
  20. console.log('finished');
  21. });
  22. //=> foo
  23. //=> bar
  24. //=> baz
  25. //=> finished
  26. ```
  27. ## API
  28. ### eachSeries(array, iterator(elem, cb(err, elem)), finishedCb(err))
  29. ## License
  30. The MIT License (MIT)
  31. Copyright (c) 2014 William Casarin
  32. Permission is hereby granted, free of charge, to any person obtaining a copy
  33. of this software and associated documentation files (the "Software"), to deal
  34. in the Software without restriction, including without limitation the rights
  35. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  36. copies of the Software, and to permit persons to whom the Software is
  37. furnished to do so, subject to the following conditions:
  38. The above copyright notice and this permission notice shall be included in
  39. all copies or substantial portions of the Software.
  40. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  41. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  42. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  43. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  44. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  45. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  46. THE SOFTWARE.