{"_id":"asyncreduce","_rev":"23-18bcd1e70c482ad45fbbdc3fb8aa2a85","name":"asyncreduce","description":"Reduce an array of values via an asynchronous function.","dist-tags":{"latest":"0.1.4"},"versions":{"0.0.1":{"name":"asyncreduce","version":"0.0.1","description":"Reduce an array of values via an asynchronous function.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"browserify --debug ./test/*.js > ./test/browser/bundle.js && open test/browser/index.html"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"},"homepage":"https://github.com/thlorenz/asyncreduce","dependencies":{"runnel":"~0.5.0"},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","browserify":"~2.25.0"},"keywords":[],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/asyncreduce/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce);\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n  - run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n    npm\n  - TODO: browserify-cdn\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/asyncreduce/issues"},"_id":"asyncreduce@0.0.1","dist":{"shasum":"ab11662e413879a8df6c66f3f7bd99af83313a7a","tarball":"https://registry.npmjs.org/asyncreduce/-/asyncreduce-0.0.1.tgz","integrity":"sha512-3gdwRIuoDFotcUnvVCb59Rju53By68TW4e+HLPOHIosqmXiy/QEs/aHdqWyC4IbDppdVXfo3ecgbT6Wz0BwaWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAXdsAMtQ6oKxkLw4usPkj7oUvVHExDKdU99IEvv990AiBfrOE72wecm2CqrKC4z1AeCjm7LIv3vJ1T8otM9hxcNQ=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.1.0":{"name":"asyncreduce","version":"0.1.0","description":"Reduce an array of values via an asynchronous function.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"browserify --debug ./test/*.js > ./test/browser/bundle.js && open test/browser/index.html"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"},"homepage":"https://github.com/thlorenz/asyncreduce","dependencies":{"runnel":"~0.5.0"},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","browserify":"~2.25.0"},"keywords":[],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/asyncreduce/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce);\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n- run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n  npm\n- download the [asyncreduce standalone version](http://wzrd.in.nyud.net/standalone/asyncreduce), powered by\n  [browserify as a service](http://wzrd.in.nyud.net)\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/asyncreduce/issues"},"_id":"asyncreduce@0.1.0","dist":{"shasum":"055e4ad976cd91f4fffa83b064c9166ca75cab7f","tarball":"https://registry.npmjs.org/asyncreduce/-/asyncreduce-0.1.0.tgz","integrity":"sha512-VVzsjJDciCP5lY14MFaacoza0qORRw4bvDpIeGSYtJLlpp5uz2nEa44ulfFfZqrhO290y9bJNrKqNC5uRSKkdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZK8avB7FoA9bHM3VLlXoPX1beJjFLfrJncEC18S3BPAiEA/DMaR0zoECZZx7x+lB9rUwEtrtsJEjadyttznX9GuA0="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.1.1":{"name":"asyncreduce","version":"0.1.1","description":"Reduce an array of values via an asynchronous function.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"browserify --debug ./test/*.js > ./test/browser/bundle.js && open test/browser/index.html"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"},"homepage":"https://github.com/thlorenz/asyncreduce","dependencies":{"runnel":"~0.5.0"},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","browserify":"~2.25.0"},"keywords":["async","reduce","accumulate","accumulator","browser","browserify","iterate","iterator","initial"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/asyncreduce/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce);\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n- run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n  npm\n- download the [asyncreduce standalone version](http://wzrd.in.nyud.net/standalone/asyncreduce), powered by\n  [browserify as a service](http://wzrd.in.nyud.net)\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/asyncreduce/issues"},"_id":"asyncreduce@0.1.1","dist":{"shasum":"d56f801e6346febcb01502966568f26f916d1043","tarball":"https://registry.npmjs.org/asyncreduce/-/asyncreduce-0.1.1.tgz","integrity":"sha512-/j8HIZWX1QkhBV5RymIAYt+RadthUu5iB3xkhIGJt3JG0+gK6W1plDFoyPSgBNBt/dMZxaF92+hLXE0W9/m8yQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYV286IAQJgFd8kWAv9x0ibmTgYyup6P50YdHbMa8aRAiEAuNQ7R6mZzvf8nmJnN9e0rby0O1SW5o9Aryj6vujGuOw="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.1.2":{"name":"asyncreduce","version":"0.1.2","description":"Reduce an array of values via an asynchronous function.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"browserify --debug ./test/*.js > ./test/browser/bundle.js && open test/browser/index.html"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"},"homepage":"https://github.com/thlorenz/asyncreduce","dependencies":{"runnel":"~0.5.0"},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","browserify":"~2.25.0"},"keywords":["async","reduce","accumulate","accumulator","browser","browserify","iterate","iterator","initial"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/asyncreduce/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce');\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n```\nsizes:\n { '.gitignore': 97,\n  '.jshintrc': 249,\n  '.travis.yml': 48,\n  'index.js': 1534,\n  'Readme.md': 2160 }\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n- run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n  npm\n- download the [asyncreduce standalone version](http://wzrd.in.nyud.net/standalone/asyncreduce), powered by\n  [browserify as a service](http://wzrd.in.nyud.net)\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/asyncreduce/issues"},"_id":"asyncreduce@0.1.2","dist":{"shasum":"e49d15aa0f0c3d4eb223d0509dda9b7a3a511f5f","tarball":"https://registry.npmjs.org/asyncreduce/-/asyncreduce-0.1.2.tgz","integrity":"sha512-uroSrxBlkXqaWfouLEn2NLvizwiZbX6SgapiLME4fVCFsgNyHzn9ZpX+WSNBvOf8LdPVQKkCHwDb47kicJQwCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJJD81J7k6TfkJ/yey26+BDs914fz9kfBpJfzx80645gIgMaZqy+l4RFRONgaRnpAX4fE6uiaYOLZK7zN5z9kGORk="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.1.3":{"name":"asyncreduce","version":"0.1.3","description":"Reduce an array of values via an asynchronous function.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run tape","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"testling -x open","tape-dev":"browserify --debug ./test/*.js > ./test/browser/bundle.js && open test/browser/index.html"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"},"homepage":"https://github.com/thlorenz/asyncreduce","dependencies":{"runnel":"~0.5.0"},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","browserify":"~2.25.0","testling":"~1.5.1"},"keywords":["async","reduce","accumulate","accumulator","browser","browserify","iterate","iterator","initial"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/asyncreduce/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce');\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n```\nsizes:\n { '.gitignore': 97,\n  '.jshintrc': 249,\n  '.travis.yml': 48,\n  'index.js': 1534,\n  'Readme.md': 2160 }\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n- run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n  npm\n- download the [asyncreduce standalone version](http://wzrd.in.nyud.net/standalone/asyncreduce), powered by\n  [browserify as a service](http://wzrd.in.nyud.net)\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/asyncreduce/issues"},"_id":"asyncreduce@0.1.3","dist":{"shasum":"5c01e5858fb39fab0669911edb1cf4ea2c44db9f","tarball":"https://registry.npmjs.org/asyncreduce/-/asyncreduce-0.1.3.tgz","integrity":"sha512-uu0qjhvQtejWAncydtb+NgCAOFZP8MozIqLSfqk+2qiPcahU7phfPQGhF/5WzsVSQfhMcpRtwqPGhyYo91ZCzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVZ9QWG5Z+ZiK6O+cgZLDXVB1GUUNoQ2cD8GpRVSjn0QIgYkqwz6rFp2L0yPjZV8W9KcUaAKGlXoaP62WCe3k2GNE="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.1.4":{"name":"asyncreduce","version":"0.1.4","description":"Reduce an array of values via an asynchronous function.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run tape","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"testling -x open","tape-dev":"browserify --debug ./test/*.js > ./test/browser/bundle.js && open test/browser/index.html"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"},"homepage":"https://github.com/thlorenz/asyncreduce","dependencies":{"runnel":"~0.5.0"},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","browserify":"~2.25.0","testling":"~1.5.1"},"keywords":["async","reduce","accumulate","accumulator","browser","browserify","iterate","iterator","initial"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/asyncreduce/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\n[![testling badge](https://ci.testling.com/thlorenz/asyncreduce.png)](https://ci.testling.com/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce');\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n```\nsizes:\n { '.gitignore': 97,\n  '.jshintrc': 249,\n  '.travis.yml': 48,\n  'index.js': 1534,\n  'Readme.md': 2160 }\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n- run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n  npm\n- download the [asyncreduce standalone version](http://wzrd.in.nyud.net/standalone/asyncreduce), powered by\n  [browserify as a service](http://wzrd.in.nyud.net)\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/asyncreduce/issues"},"_id":"asyncreduce@0.1.4","dist":{"shasum":"18210e01978bfdcba043955497a5cd315c0a6a41","tarball":"https://registry.npmjs.org/asyncreduce/-/asyncreduce-0.1.4.tgz","integrity":"sha512-9q50+pYllC5Xg2BQCJBYvHpc5InGixioeLPxaKvUg3lFwItSbxbEpClPX7+GjXT3RFQk64ThvyGTdFs9ftb/hg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIESpE2gNL6Lu9jbzYsAZQsPCWizVthDKSVPMFEIvCtsEAiEA2kkxOr1oklkBo8bXV0fvrLJRsqUPaF+2hq7/t62z1t8="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}]}},"readme":"# asyncreduce [![build status](https://secure.travis-ci.org/thlorenz/asyncreduce.png)](http://travis-ci.org/thlorenz/asyncreduce)\n\nReduce an array of values via an asynchronous function.\n\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar asyncReduce = require('asyncreduce);\n\nasyncReduce(\n    [ '.gitignore', '.jshintrc', '.travis.yml', 'index.js', 'Readme.md' ]\n  , {}\n  , function size (acc, file, cb) {\n      var p = path.join(__dirname, '..', file);\n\n      fs.stat(p, function (err, stat) {\n        if (err) return cb(err);\n\n        acc[file] = stat.size;\n        cb(null, acc);\n      });\n    }\n  , function done (err, acc) {\n      if (err) return console.error(err);\n      console.log('sizes:\\n', acc);\n    }\n);\n```\n\n## Features\n\n- super small library built on top of also quite small [runnel](https://github.com/thlorenz/runnel)\n- since runnel `try/catch`es and bubbles errors and reports with detailed stack traces, so does asyncreduce\n\n## Installation\n\n    npm install asyncreduce\n\n### In the browser\n\n#### With [browserify](https://github.com/substack/node-browserify)\n\nYou are all good.\n\n#### Without browserify\n\nTwo options:\n\n  - run [browserify --standalone](https://github.com/substack/node-browserify#usage) after installing this package via\n    npm\n  - TODO: browserify-cdn\n\n## API\n\n### *function asyncReduce (items, seed, iterator, done)*\n\n```\n/**\n * Calls provided async iterator function with the accumulator and each item.\n * When all items have been iterated over calls done with a possible error or the final value of the accumulator.\n *\n * @name exports\n * @function\n * @param items {Array} the items to be reduced\n * @param seed {T} the initial value that can be of any type and is passed along as the accumulator (acc) each time the iterator is called\n * @param iterator {Function} function (acc, item, callback) {} - the iterator called for each item\n * @param done {Function} function (err, acc) {} - called with final accumulated value or an error if one occurred\n */\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"time":{"modified":"2022-06-13T03:39:10.823Z","created":"2013-07-19T13:57:30.788Z","0.0.1":"2013-07-19T13:57:32.104Z","0.1.0":"2013-07-19T14:02:16.814Z","0.1.1":"2013-07-19T14:03:50.747Z","0.1.2":"2013-07-19T16:23:18.580Z","0.1.3":"2013-07-27T14:44:14.133Z","0.1.4":"2013-07-27T15:32:48.103Z"},"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"repository":{"type":"git","url":"git://github.com/thlorenz/asyncreduce.git"}}