{ "name": "array-reduce", "version": "0.0.0", "description": "`[].reduce()` for old browsers", "main": "index.js", "devDependencies": { "tape": "~2.3.2" }, "scripts": { "test": "tape test/*.js" }, "repository": { "type": "git", "url": "git://github.com/substack/array-reduce.git" }, "homepage": "https://github.com/substack/array-reduce", "keywords": [ "array", "reduce", "es5", "ie6", "ie7", "ie8", "fold" ], "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "license": "MIT", "testling": { "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/16..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": "# array-reduce\n\n`[].reduce()` for old browsers\n\n[![testling badge](https://ci.testling.com/substack/array-reduce.png)](https://ci.testling.com/substack/array-reduce)\n\n[![build status](https://secure.travis-ci.org/substack/array-reduce.png)](http://travis-ci.org/substack/array-reduce)\n\n# example\n\n```\nvar reduce = require('array-reduce');\nvar xs = [ 1, 2, 3, 4 ];\nvar sum = reduce(xs, function (acc, x) { return acc + x }, 0);\nconsole.log(sum);\n```\n\noutput:\n\n```\n10\n```\n\n# methods\n\n``` js\nvar reduce = require('array-reduce')\n```\n\n## var res = reduce(xs, f, init)\n\nCreate a result `res` by folding `acc = f(acc, xs[i], i)` over each element in\nthe array `xs` at element `i`. If `init` is given, the first `acc` value is\n`init`, otherwise `xs[0]` is used.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install array-reduce\n```\n\n# license\n\nMIT\n", "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/array-reduce/issues" }, "_id": "array-reduce@0.0.0", "_shasum": "173899d3ffd1c7d9383e4479525dbe278cab5f2b", "_resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", "_from": "array-reduce@>=0.0.0 <0.1.0" }