{"_id":"series","_rev":"35-280ec703d6c9f8ecd0692306a1006431","name":"series","description":"Compose a series of chainable async methods","dist-tags":{"latest":"0.3.3"},"versions":{"0.0.1":{"name":"series","version":"0.0.1","description":"Syncable set","keywords":["library","syncable","set","observable"],"author":{"name":"Joris Röling","email":"joris@bonboa.com"},"dependencies":{"eyes":">= 0.1.6"},"main":"index","engines":{"node":"0.4.x"},"_id":"series@0.0.1","_engineSupported":true,"_npmVersion":"0.3.15","_nodeVersion":"v0.4.2","directories":{"lib":"./lib"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"15d17f57a7f66b91a70f3ceef8dea8b4dd56a6d3","tarball":"https://registry.npmjs.org/series/-/series-0.0.1.tgz","integrity":"sha512-4l/yRK8p3wRPtkLTeXVLysecLYsFjItjok9Epii4h8CGEQ0D72NKrQFDFj7HXMcVxTzikIXAyA0pAOgEGAYE0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHitCJNrVGFWY9PRAkeu2elySlZ0hT1Y60V34TjH67aAAiAPpyUUVYg0fYVPYlXo5h4UNR2xwc0tfKD0kNvkTg+HVQ=="}]}},"0.0.2":{"name":"series","version":"0.0.2","description":"Syncable set","keywords":["library","syncable","set","observable"],"author":{"name":"Joris Röling","email":"joris@bonboa.com"},"main":"index","engines":{"node":"0.4.x"},"_id":"series@0.0.2","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.4.3","directories":{"lib":"./lib"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"a1b00445586c34cd527d8283c616661060a03ef5","tarball":"https://registry.npmjs.org/series/-/series-0.0.2.tgz","integrity":"sha512-8eATs/nF8EpSU1s3C18FTKP7yYLzRhs9tA6MORROiBy1bYAsY9zNBepdzftKhPoklIET0wm+73L5hqwa96HdxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHvXyETbGHWXXFxxUs863DcFMhiG87i/I/AuGxwyN42wIgbKQYFjQJf5VzK5MnN4I9gagL/aevdPjhXALquaGyA/A="}]}},"0.0.3":{"name":"series","version":"0.0.3","description":"Syncable set","keywords":["library","syncable","set","observable"],"author":{"name":"Joris Röling","email":"joris@bonboa.com"},"main":"index","engines":{"node":"0.4.x"},"_id":"series@0.0.3","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.4.3","directories":{"lib":"./lib"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"0c14a2f48aa838bf5084cc5bc957a5062cd0e77c","tarball":"https://registry.npmjs.org/series/-/series-0.0.3.tgz","integrity":"sha512-Swmx3/E8MF/tjxQT+uZOMvA7MQDoW8sVv4on2c61D5Vs1VITQijYMjZL0sqf7gT0m2388HlPEBHpw7JYYbRSFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCikz1yia76yfdB6k3E9bBQozqCdaW43CLgH6m2hiwx0AIgRTlWBEzQaMg+HVbp/PGbYD/kTp7+Rgj7ceq30nMj9og="}]}},"0.0.4":{"name":"series","version":"0.0.4","description":"Syncable set","keywords":["library","syncable","set","observable"],"author":{"name":"Joris Röling","email":"joris@bonboa.com"},"main":"index","engines":{"node":"0.4.x"},"_id":"series@0.0.4","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.4.3","directories":{"lib":"./lib"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"8d8bb4c496ca830f5929a930c054d3a4128b1a67","tarball":"https://registry.npmjs.org/series/-/series-0.0.4.tgz","integrity":"sha512-VMSuuoGVcVWEkV54BksBmr3cu6JKVwTiyLGCWN1mChuoOK/N8umyPgId3skjb/5IDy56RHnmwB9FWg55m5pw8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnWMLUGqTUhCkk08uM5gomjxmEiKxtVI8yq7ovSTm4KAiEAoTrNeS1PBa1mtlHk2666bBj07S6XY/OpqsFEY82wHyY="}]}},"0.0.6":{"name":"series","version":"0.0.6","description":"Syncable set","keywords":["library","syncable","set","observable"],"author":{"name":"Joris Röling","email":"joris@bonboa.com"},"main":"index","engines":{"node":"0.4.x"},"_id":"series@0.0.6","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.4.3","directories":{"lib":"./lib"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"5f049c1cca2704fefc0187c9c8a52ffbed0a94ca","tarball":"https://registry.npmjs.org/series/-/series-0.0.6.tgz","integrity":"sha512-ZHy337hFARuFGW3/osr2hiS4GNbq+IyYsSZE4QDDKjYcyeGdn5eK/t/4j6ppqAZzU9QrKK/xHV3dat2BPx4iRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOwIfS76VtUsP8xjcpQs/TDs7nrfDx1kvtMuMSv2rPngIgEVY4ukEOnB8SDXGAUxR3nG5mDG29sdstiqq6SpS3zr0="}]}},"0.0.0":{"name":"series","version":"0.0.0","description":"series ======","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/scottcorgan/series.git"},"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/series/issues"},"readme":"series\n======\n","readmeFilename":"README.md","_id":"series@0.0.0","dist":{"shasum":"1574ae996b2d50421cbe447daaf3d10c4e0e4d0a","tarball":"https://registry.npmjs.org/series/-/series-0.0.0.tgz","integrity":"sha512-T7DLzK7nM8yA2qv3mOS6vV7xD75rFhaOJ7910+z18rXEZ/oD7bTs83J50UW4w9WIkhEu1pIMVPO7jEugaJY+kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHT+vn/rFCEMy6VYvgHFVIePg+cSybJ+dv4B9Jml3ZQpAiEA1qa7ELKY5Fq/hGOlzj8Fk/Gf2cxfZj/7cdYMNGLiWU8="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.0":{"name":"series","version":"0.2.0","description":"Compose a series of chainable async methods","main":"index.js","scripts":{"test":"node_modules/.bin/mocha test/"},"repository":{"type":"git","url":"https://github.com/scottcorgan/series.git"},"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/series/issues"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.14.0","async":"~0.2.9"},"dependencies":{"promise":"~3.2.0"},"keywords":["chain","async","compose"],"readme":"# Series\n\nCompose a series of chainable async methods.\n\n## Install\n\n```\nnpm install series --save\n```\n\n## Usage\n\n```js\nvar Series = require('series');\nvar series = Series();\nvar async = require('async'); // <~~ simply for usage example\n\n// Add methods to our series sequence\nseries.add('map', function (items, iterator, next) {\n  async.map(items, iterator, next);\n});\n\nseries.add('sortBy', function (items, iterator, next) {\n  async.sortBy(items, iterator, next);\n});\n\nseries.add('filter', function (items, iterator, next) {\n  var self = this;\n  var error;\n  \n  async.filter(items, function (item, callback) {\n    iterator(item, function (err, matched) {\n      if (err) {\n        error = err;\n        return;\n      }\n      \n      callback(matched);\n    });\n  }, function (filteredItems) {\n    next(error, filteredItems);\n  });\n});\n\n// Use our series\nvar list = [\n  {\n    name: 'John',\n    age: 25\n  },\n  {\n    name: 'Jane',\n    age: 20\n  }\n];\n\nseries(list)\n  .sortBy(function (item, next) {\n    next(null, item.age);\n  })\n  .map(function (item, next) {\n    next(null, item.age);\n  })\n  .then(function (items) {\n    // items now equals: [20, 25]\n  }, function () {\n    // oops, an error may have occured\n  });\n```\n\n## series\n\nThe instance value returned from calling `Series()` is both a function and an object. The object is the instance and the function returns the series chain.\n\n`series()` supports the follow as initial values to start the series:\n\n* **Primitive** - strings, numbers, etc.\n* **Array** - an array of primitives or objects\n* **Function** - a function that is passed a `next` callback that must be called with the following: `next(err, value)`. The value passed as the second argument becomes the initial value of the series.\n\n###For example:\n\n**Primitive**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = 'my value';\nseries(someValue);\n```\n\n**Array**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = [1,2,3,4,5];\nseries(someValue);\n```\n\n**Function**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nseries(function (next) {\n  var someValue = 'my value';\n  next(null, someValue);\n});\n```\n\n## instance methods\n\nThese methods are available on the `series` variable.\n\n### add(methodName, methodTask)\n\nComposes a chainable method on the series. The method is added for all instances of that particular series.\n\n**methodName**\n\nA string that will be used as the method name\n\n**methodTask**\n\nA callback function that is passed the following parameters\n\n* `items` - any value that you would like passed to the first method in the series\n* `iterator` - the method called on the value from the previous method that performs some sort of user defined operation\n* `next` - the callback once all items in the list or collection have been processed.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\n// Add methods to our series sequence\nseries.add('map', function (items, iterator, next) {\n  iterator(items, function (err, processItems) {\n    next(err, processItems);\n  });\n});\n```\n\n## series sequence methods\n\nThese methods are available on the value returned from called `series(someValue)`\n\nThe methods available vary according to which methods have been added to the series. In the usage example above, we've added `map`, `sortBy`, and `filter`. These methods would be available on the series as well as:\n\n### then(successCallback, errorCallback)\n\nEach series sequence returns a promise. Refer to the [Promises/A+](http://promises-aplus.github.io/promises-spec/) spec for more details.\n\n**successCallback**\n\nThis is called once all chained methods have processed the initial value, unless an error has occurred.\n\n**errorCallback**\n\nThis is called if an error occurs anywhere when processing the initial value in any of the chainable methods. If an error occurs, all processing stops.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = 'my value';\nseries(someValue)\n  .someChainableMethod(function (value, next) {\n    next(null, value + 's');\n  })\n  .then(function (processedValue) {\n    // processedValue == my values\n  });\n```\n\n## TODO\n\n* more detailed documentation\n* allow callbacks on each chained method\n* allow promises to be passed in as inititial value to series\n* **Series** module examples\n\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```\n","readmeFilename":"README.md","_id":"series@0.2.0","dist":{"shasum":"31ec628c9563b2a67e2affc4cb745ba5262530be","tarball":"https://registry.npmjs.org/series/-/series-0.2.0.tgz","integrity":"sha512-IoJFgwJUCyuzKog1NoYmGxc0Q6iTBF94Tq9B4LPNBRB4axYzx8tjKlqSb/+CiJ+Bu+WpA1pm0D9zZ4febCmuXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqpMHqPRtOwv5VAMSJVtuvfB9fyLDZkz8NyKxMd9EqdAIhAPVgwlKtoS5BCSUyUz+GKiYCoEbtG5uMioC/UZIhViPa"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.0":{"name":"series","version":"0.3.0","description":"Compose a series of chainable async methods","main":"index.js","scripts":{"test":"node_modules/.bin/mocha test/"},"repository":{"type":"git","url":"https://github.com/scottcorgan/series.git"},"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/series/issues"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.14.0","async":"~0.2.9"},"dependencies":{"promise":"~3.2.0","drainer":"~0.1.0"},"keywords":["chain","async","compose"],"readme":"# Series\n\nCompose a series of chainable async methods. Supports callbacks AND promises.\n\nSupports Node and [Browserify](http://browserify.org/)\n\n## Install\n\n```\nnpm install series --save\n```\n\n## Usage\n\n```js\nvar Series = require('series');\nvar series = Series();\nvar async = require('async'); // <~~ simply for usage example\n\n// Add methods to our series sequence\nseries.add('map', function (items, iterator, next) {\n  async.map(items, iterator, next);\n});\n\nseries.add('sortBy', function (items, iterator, next) {\n  async.sortBy(items, iterator, next);\n});\n\nseries.add('filter', function (items, iterator, next) {\n  var self = this;\n  var error;\n  \n  async.filter(items, function (item, callback) {\n    iterator(item, function (err, matched) {\n      if (err) {\n        error = err;\n        return;\n      }\n      \n      callback(matched);\n    });\n  }, function (filteredItems) {\n    next(error, filteredItems);\n  });\n});\n\n// Use our series\nvar list = [\n  {\n    name: 'John',\n    age: 25\n  },\n  {\n    name: 'Jane',\n    age: 20\n  }\n];\n\nseries(list)\n  .sortBy(function (item, next) {\n    next(null, item.age);\n  })\n  .map(function (item, next) {\n    next(null, item.age);\n  }, function (err, items) {\n    // Support for callbacks\n  })\n  .then(function (items) {\n    // items now equals: [20, 25]\n  }, function (err) {\n    // oops, an error may have occured\n  });\n```\n\n## series\n\nThe instance value returned from calling `Series()` is both a function and an object. The object is the instance and the function returns the series chain.\n\n`series()` supports the following as initial values to start the series:\n\n* **Primitive** - strings, numbers, etc.\n* **Array** - an array of primitives or objects\n* **Function** - a function that is passed a `next` callback that must be called with the following: `next(err, value)`. The value passed as the second argument becomes the initial value of the series.\n* **Promise** - a [ Promises/A+](http://promises-aplus.github.io/promises-spec/) compliant value\n\n###For example:\n\n**Primitive**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = 'my value';\nseries(someValue);\n```\n\n**Array**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = [1,2,3,4,5];\nseries(someValue);\n```\n\n**Function**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nseries(function (next) {\n  var someValue = 'my value';\n  next(null, someValue);\n});\n```\n\n**Promise**\n\n```js\nvar Series = require('series');\nvar Promise = require('promise'); // <~~ npm install promise \nvar series = Series();\n\nvar promise = new Promise(function (resolve, reject) {\n  // Some logic\n});\n\nseries(promise);\n```\n\n## instance methods\n\nThese methods are available on the `series` variable.\n\n### add(methodName, methodTask)\n\nComposes a chainable method on the series. The method is added for all instances of that particular series.\n\n**methodName**\n\nA string that will be used as the method name\n\n**methodTask**\n\nA callback function that is passed the following parameters\n\n* `items` - any value that you would like passed to the first method in the series\n* `iterator` - the method called on the value from the previous method that performs some sort of user defined operation\n* `next` - the callback once all items in the list or collection have been processed.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\n// Add methods to our series sequence\nseries.add('map', function (items, iterator, next) {\n  iterator(items, function (err, processItems) {\n    next(err, processItems);\n  });\n});\n```\n\n## series sequence methods\n\nThese methods are available on the value returned from calling `series(someValue)`\n\nThe methods available vary according to which methods have been added to the series. In the usage example above, we've added `map`, `sortBy`, and `filter`. These methods would be available on the series as well as:\n\n### then(successCallback, errorCallback)\n\nEach series sequence returns a promise. Refer to the [Promises/A+](http://promises-aplus.github.io/promises-spec/) spec for more details.\n\n**successCallback**\n\nThis is called once all chained methods have processed the initial value, unless an error has occurred.\n\n**errorCallback**\n\nThis is called if an error occurs anywhere when processing the initial value in any of the chainable methods. If an error occurs, all processing stops.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = 'my value';\nseries(someValue)\n  .someChainableMethod(function (value, next) {\n    next(null, value + 's');\n  })\n  .then(function (processedValue) {\n    // processedValue == my values\n  });\n```\n\n## Callbacks\n\nEach method in the series can take a callback if you'd rather not use promises. Each callback will be called at the completion of each method.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nseries(someValue)\n  .someChainableMethod(function (value, next) {\n    next(null, value + 's');\n  }, function (err, arg1) {\n    // arg1 == value + 's'\n  })\n  .someOtherMethod(function (value, next) {\n    next(null);\n  }, function (err) {\n    // err == null\n  })\n```\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```\n","readmeFilename":"README.md","_id":"series@0.3.0","dist":{"shasum":"aa4407394cd39f0288a19afd02d74f08923a9359","tarball":"https://registry.npmjs.org/series/-/series-0.3.0.tgz","integrity":"sha512-PK8/Dt9N5zA1oTkXAnWzGdm+AQpLUxuUB0uOagQoT+aUTo5KX3gxryKn2680R4n4GVSa8EtS+c5zJujOGi132A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICiNU49JUkg5NQG4Lwb/wGJAy5Frmt9zOoDxo0nmq/2/AiATG/KM4qlcAAzXue08aOYrwP4tZSU61NCwSZK14Z8Yhg=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.3":{"name":"series","version":"0.3.3","description":"Compose a series of chainable async methods","main":"index.js","scripts":{"test":"node_modules/.bin/mocha test/ --reporter spec"},"repository":{"type":"git","url":"https://github.com/scottcorgan/series.git"},"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/series/issues"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.14.0","async":"~0.2.9","sinon":"~1.7.3"},"dependencies":{"promise":"~3.2.0","drainer":"~0.1.0"},"keywords":["chain","async","compose"],"readme":"# Series\n\nCompose a series of chainable async methods. Supports callbacks AND promises.\n\nSupports Node and [Browserify](http://browserify.org/)\n\n## Install\n\n```\nnpm install series --save\n```\n\n## Usage\n\n```js\nvar Series = require('series');\nvar series = Series();\nvar async = require('async'); // <~~ simply for usage example\n\n// Add methods to our series sequence\nseries.add('map', function (items, iterator, next) {\n  async.map(items, iterator, next);\n});\n\nseries.add('sortBy', function (items, iterator, next) {\n  async.sortBy(items, iterator, next);\n});\n\nseries.add('filter', function (items, iterator, next) {\n  var self = this;\n  var error;\n  \n  async.filter(items, function (item, callback) {\n    iterator(item, function (err, matched) {\n      if (err) {\n        error = err;\n        return;\n      }\n      \n      callback(matched);\n    });\n  }, function (filteredItems) {\n    next(error, filteredItems);\n  });\n});\n\n// Use our series\nvar list = [\n  {\n    name: 'John',\n    age: 25\n  },\n  {\n    name: 'Jane',\n    age: 20\n  }\n];\n\nseries(list)\n  .sortBy(function (item, next) {\n    next(null, item.age);\n  })\n  .map(function (item, next) {\n    next(null, item.age);\n  }, function (err, items) {\n    // Support for callbacks\n  })\n  .then(function (items) {\n    // items now equals: [20, 25]\n  }, function (err) {\n    // oops, an error may have occured\n  });\n```\n\n## series\n\nThe instance value returned from calling `Series()` is both a function and an object. The object is the instance and the function returns the series chain.\n\n`series()` supports the following as initial values to start the series:\n\n* **Primitive** - strings, numbers, etc.\n* **Array** - an array of primitives or objects\n* **Function** - a function that is passed a `next` callback that must be called with the following: `next(err, value)`. The value passed as the second argument becomes the initial value of the series.\n* **Promise** - a [ Promises/A+](http://promises-aplus.github.io/promises-spec/) compliant value\n\n###For example:\n\n**Primitive**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = 'my value';\nseries(someValue);\n```\n\n**Array**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = [1,2,3,4,5];\nseries(someValue);\n```\n\n**Function**\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nseries(function (next) {\n  var someValue = 'my value';\n  next(null, someValue);\n});\n```\n\n**Promise**\n\n```js\nvar Series = require('series');\nvar Promise = require('promise'); // <~~ npm install promise \nvar series = Series();\n\nvar promise = new Promise(function (resolve, reject) {\n  // Some logic\n});\n\nseries(promise);\n```\n\n## instance methods\n\nThese methods are available on the `series` variable.\n\n### add(methodName, methodTask)\n\nComposes a chainable method on the series. The method is added for all instances of that particular series.\n\n**methodName**\n\nA string that will be used as the method name\n\n**methodTask**\n\nA callback function that is passed the following parameters\n\n* `items` - any value that you would like passed to the first method in the series\n* `iterator` - the method called on the value from the previous method that performs some sort of user defined operation\n* `next` - the callback once all items in the list or collection have been processed.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\n// Add methods to our series sequence\nseries.add('map', function (items, iterator, next) {\n  iterator(items, function (err, processItems) {\n    next(err, processItems);\n  });\n});\n```\n\n## series sequence methods\n\nThese methods are available on the value returned from calling `series(someValue)`\n\nThe methods available vary according to which methods have been added to the series. In the usage example above, we've added `map`, `sortBy`, and `filter`. These methods would be available on the series as well as:\n\n### then(successCallback, errorCallback)\n\nEach series sequence returns a promise. Refer to the [Promises/A+](http://promises-aplus.github.io/promises-spec/) spec for more details.\n\n**successCallback**\n\nThis is called once all chained methods have processed the initial value, unless an error has occurred.\n\n**errorCallback**\n\nThis is called if an error occurs anywhere when processing the initial value in any of the chainable methods. If an error occurs, all processing stops.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nvar someValue = 'my value';\nseries(someValue)\n  .someChainableMethod(function (value, next) {\n    next(null, value + 's');\n  })\n  .then(function (processedValue) {\n    // processedValue == my values\n  });\n```\n\n## Callbacks\n\nEach method in the series can take a callback if you'd rather not use promises. Each callback will be called at the completion of each method.\n\n#### For Example:\n\n```js\nvar Series = require('series');\nvar series = Series();\n\nseries(someValue)\n  .someChainableMethod(function (value, next) {\n    next(null, value + 's');\n  }, function (err, arg1) {\n    // arg1 == value + 's'\n  })\n  .someOtherMethod(function (value, next) {\n    next(null);\n  }, function (err) {\n    // err == null\n  })\n```\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```\n","readmeFilename":"README.md","_id":"series@0.3.3","dist":{"shasum":"e76e7ccf2901e4e21a1a25732cf62fd98db8de3e","tarball":"https://registry.npmjs.org/series/-/series-0.3.3.tgz","integrity":"sha512-IW0sImilztBPMRuVXUD2ZPy7GWfmvOs/UUm5CeYzMSr7dRM7palJqf8ma2in+5JbPkvPcYsY+JWslnS3DbYYnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/vX8Hf/LN/xzkvIVV+sJZONwKdWXaNTh4O8vlb/3reAIgLC/f0/u8Ope8PdWKjWWeuDLQgV7EGI87ZrBwAWkUInw="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]}},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"time":{"modified":"2022-06-26T17:56:54.019Z","created":"2011-03-21T09:06:46.086Z","0.0.1":"2011-03-21T09:06:46.524Z","0.0.2":"2011-03-22T13:23:54.025Z","0.0.3":"2011-03-22T13:30:25.199Z","0.0.4":"2011-03-23T10:58:48.951Z","0.0.6":"2011-03-24T14:28:44.716Z","0.0.0":"2013-12-03T15:55:59.641Z","0.2.0":"2013-12-03T16:11:36.336Z","0.3.0":"2013-12-03T23:23:09.355Z","0.3.3":"2013-12-16T17:27:07.104Z"},"author":{"name":"Scott Corgan"},"repository":{"type":"git","url":"https://github.com/scottcorgan/series.git"}}