{ "_id": "concat-map", "_rev": "7-0c8e4d38de42e94c53f5313a84c313f4", "name": "concat-map", "description": "concatenative mapdashery", "dist-tags": { "latest": "0.0.1" }, "versions": { "0.0.0": { "name": "concat-map", "description": "concatenative mapdashery", "version": "0.0.0", "repository": { "type": "git", "url": "git://github.com/substack/node-concat-map.git" }, "main": "index.js", "keywords": [ "concat", "map", "functional", "higher-order" ], "directories": { "example": "example", "test": "test" }, "scripts": { "test": "tap test/*.js" }, "devDependencies": { "tap": "~0.2.5" }, "engines": { "node": ">=0.4.0" }, "license": "MIT", "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "_npmUser": { "name": "substack", "email": "mail@substack.net" }, "_id": "concat-map@0.0.0", "dependencies": {}, "optionalDependencies": {}, "_engineSupported": true, "_npmVersion": "1.1.19", "_nodeVersion": "v0.6.11", "_defaultsLoaded": true, "dist": { "shasum": "604be9c2afb6dc9ba8182e3ff294fdd48e238e6d", "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.0.tgz" }, "maintainers": [ { "name": "substack", "email": "mail@substack.net" } ] }, "0.0.1": { "name": "concat-map", "description": "concatenative mapdashery", "version": "0.0.1", "repository": { "type": "git", "url": "git://github.com/substack/node-concat-map.git" }, "main": "index.js", "keywords": [ "concat", "concatMap", "map", "functional", "higher-order" ], "directories": { "example": "example", "test": "test" }, "scripts": { "test": "tape test/*.js" }, "devDependencies": { "tape": "~2.4.0" }, "license": "MIT", "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "testling": { "files": "test/*.js", "browsers": { "ie": [ 6, 7, 8, 9 ], "ff": [ 3.5, 10, 15 ], "chrome": [ 10, 22 ], "safari": [ 5.1 ], "opera": [ 12 ] } }, "bugs": { "url": "https://github.com/substack/node-concat-map/issues" }, "homepage": "https://github.com/substack/node-concat-map", "_id": "concat-map@0.0.1", "dist": { "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" }, "_from": ".", "_npmVersion": "1.3.21", "_npmUser": { "name": "substack", "email": "mail@substack.net" }, "maintainers": [ { "name": "substack", "email": "mail@substack.net" } ] } }, "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)\n\n[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)\n\nexample\n=======\n\n``` js\nvar concatMap = require('concat-map');\nvar xs = [ 1, 2, 3, 4, 5, 6 ];\nvar ys = concatMap(xs, function (x) {\n return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];\n});\nconsole.dir(ys);\n```\n\n***\n\n```\n[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]\n```\n\nmethods\n=======\n\n``` js\nvar concatMap = require('concat-map')\n```\n\nconcatMap(xs, fn)\n-----------------\n\nReturn an array of concatenated elements by calling `fn(x, i)` for each element\n`x` and each index `i` in the array `xs`.\n\nWhen `fn(x, i)` returns an array, its result will be concatenated with the\nresult array. If `fn(x, i)` returns anything else, that value will be pushed\nonto the end of the result array.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install concat-map\n```\n\nlicense\n=======\n\nMIT\n\nnotes\n=====\n\nThis module was written while sitting high above the ground in a tree.\n", "maintainers": [ { "name": "substack", "email": "mail@substack.net" } ], "time": { "modified": "2014-01-30T03:06:35.982Z", "created": "2012-06-08T04:31:26.867Z", "0.0.0": "2012-06-08T04:31:28.515Z", "0.0.1": "2014-01-30T03:06:35.982Z" }, "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "repository": { "type": "git", "url": "git://github.com/substack/node-concat-map.git" }, "readmeFilename": "README.markdown", "users": { "markthethomas": true, "klap-webdevelopment": true, "wenbing": true }, "_attachments": {} }