{"_id":"map-iterable","_rev":"7-8432c160bffd02783aa0c0737809a062","name":"map-iterable","time":{"modified":"2022-06-19T15:51:39.156Z","created":"2016-01-21T13:22:49.927Z","1.0.0":"2016-01-21T13:22:49.927Z","1.0.1":"2016-09-13T22:12:18.179Z","2.0.0":"2017-11-17T10:09:41.010Z"},"maintainers":[{"name":"parroit","email":"andrea@parro.it"}],"dist-tags":{"latest":"2.0.0"},"description":"Array.prototype.map analog for iterables.","readme":"# map-iterable\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/parro-it/map-iterable.svg)](https://greenkeeper.io/)\n\n> Array.prototype.map analog for iterables.\n\n[![Travis Build Status](https://img.shields.io/travis/parro-it/map-iterable/master.svg)](http://travis-ci.org/parro-it/map-iterable)\n[![NPM module](https://img.shields.io/npm/v/map-iterable.svg)](https://npmjs.org/package/map-iterable)\n[![NPM downloads](https://img.shields.io/npm/dt/map-iterable.svg)](https://npmjs.org/package/map-iterable)\n\nThe map() method creates a new iterable with the results of calling a provided\nfunction on every element in given iterable.\n\nYou can omit the data argument and you get a function that map over the provided\nfunction.\n\n# Installation\n\n```bash\nnpm install --save map-iterable\n```\n\n# Examples\n\n```js\nconst map = require(\"map-iterable\");\nconst numbers = [1, 4, 9];\nconst roots = Array.from(map(Math.sqrt, numbers));\n// roots is now [1, 2, 3], numbers is still [1, 4, 9]\n```\n\n**using partial apply**\n\n```js\nconst map = require(\"map-iterable\");\nconst mapSqrt = map(Math.sqrt);\nconst numbers = [1, 4, 9];\ncons;\nconst roots = Array.from(mapSqrt(numbers));\n// roots is now [1, 2, 3], numbers is still [1, 4, 9]\n```\n\n# API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## map\n\nCreates a new iterable with the results of calling `transform` function on every\nelement in `data` iterable. If you omit the data argument return a unary\nfunction that accept the data argument and map over the provided function.\n\n**Parameters**\n\n* `transform`\n  **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**\n  a function that return an element of the new Iterable, receiving as arguments:\n  . currentValue - The current element being processed in the iterable. index -\n  The index of the current element being processed in the iterable.\n* `data` **Iterable** The source iterable to iterate over.\n\nReturns **Iterable** A new Iterable over results of the transform function.\n\n# License\n\nThe MIT License (MIT)\n\n© 2017 Andrea Parodi\n","versions":{"1.0.1":{"name":"map-iterable","version":"1.0.1","description":"Array.prototype.map analog for iterables.","repository":{"type":"git","url":"git+https://github.com/parro-it/map-iterable.git"},"license":"MIT","author":{"name":"Andrea Parodi","email":"andrea@parro.it"},"scripts":{"test":"ava --no-babel && xo","cover-test":"nyc ava --no-babel"},"keywords":["iterable","generator","map","functional"],"engines":{"node":">=4"},"devDependencies":{"ava":"^0.15.2","coveralls":"^2.11.11","nyc":"^7.0.0","xo":"^0.16.0"},"files":["index.js"],"dependencies":{"is-iterable":"^1.1.0","curry":"^1.2.0"},"gitHead":"ab7a8363324ebd070933bd4354c58a482fa807f0","bugs":{"url":"https://github.com/parro-it/map-iterable/issues"},"homepage":"https://github.com/parro-it/map-iterable#readme","_id":"map-iterable@1.0.1","_shasum":"ab0fc1166014bd625fbcdfaee289af560e611ad9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"parroit","email":"andrea@parro.it"},"dist":{"shasum":"ab0fc1166014bd625fbcdfaee289af560e611ad9","tarball":"https://registry.npmjs.org/map-iterable/-/map-iterable-1.0.1.tgz","integrity":"sha512-siKFftph+ka2jWt8faiOWFzKP+eEuXrHuhYBitssJ5zJm209FCw5JBnaNLDiaCCb/CYZmxprdM6P7p16nA6YRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3fYGWRh9KWIZeNRKcJA7syD7JuoV6kIKyKMdcTw90GAiEAkCiTAIzE5sM3l7xdw7MJpfj8Xet47qM6yybMDHDYyJI="}]},"maintainers":[{"name":"parroit","email":"andrea@parro.it"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/map-iterable-1.0.1.tgz_1473804737529_0.6134854056872427"}},"2.0.0":{"name":"map-iterable","version":"2.0.0","description":"Array.prototype.map analog for iterables.","repository":{"type":"git","url":"git+https://github.com/parro-it/map-iterable.git"},"license":"MIT","author":{"name":"Andrea Parodi","email":"andrea@parro.it"},"scripts":{"test":"ava && linterjs .","doc":"documentation readme index.js --section=API"},"keywords":["iterable","generator","map","functional"],"engines":{"node":">=9"},"devDependencies":{"@std/esm":"^0.16.0","ava":"^0.21.0","documentation":"^5.3.3","linterjs":"^1.10.1"},"files":["index.js"],"ava":{"require":["@std/esm"]},"@std/esm":{"esm":"js","cjs":true},"dependencies":{"is-iterable":"^1.1.0"},"gitHead":"1fdd2c8dde8554e43dd27efcce3ac0572f84164e","bugs":{"url":"https://github.com/parro-it/map-iterable/issues"},"homepage":"https://github.com/parro-it/map-iterable#readme","_id":"map-iterable@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"9.1.0","_npmUser":{"name":"parroit","email":"andrea@parro.it"},"dist":{"integrity":"sha512-OnxC+mSqRLWrPo53hnJSwo4KTGT+X6TMxrCqjsK8CvmXQhf6scZ1Kp/WrqLUkOcVjJbwRsruFKN8iOpW8BoU+Q==","shasum":"0a894f80de2f3754254237373234ec6fecea66e2","tarball":"https://registry.npmjs.org/map-iterable/-/map-iterable-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS60QQiFbFHxapc5Aioftk+4vR1SRIeFkG6/NP+n2hIAIgDtjAPKu41Gz+CdMMxwxw0+NwNmxEUl63eWYln741tjA="}]},"maintainers":[{"name":"parroit","email":"andrea@parro.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/map-iterable-2.0.0.tgz_1510913380090_0.6565648107789457"}}},"homepage":"https://github.com/parro-it/map-iterable#readme","keywords":["iterable","generator","map","functional"],"repository":{"type":"git","url":"git+https://github.com/parro-it/map-iterable.git"},"author":{"name":"Andrea Parodi","email":"andrea@parro.it"},"bugs":{"url":"https://github.com/parro-it/map-iterable/issues"},"license":"MIT","readmeFilename":"README.md"}