{"_id":"map-iter","_rev":"1-b519f910e97803559ce95ef3f6a5d6d1","name":"map-iter","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"map-iter","version":"1.0.0","description":"Applies a callback to each value outputted by an iterable.","keywords":["iterable","map","values","callback"],"author":{"name":"Fr. John Lamansky","url":"lamansky.com"},"license":"MIT","homepage":"https://github.com/lamansky/map-iter","repository":{"type":"git","url":"git+https://github.com/lamansky/map-iter.git"},"main":"index.js","files":[],"engines":{"node":">=6.0.0"},"dependencies":{"sbo":"^1.1.0"},"devDependencies":{"eslint-config-lamansky":"^1.0.0","is-iterable-with":"^1.0.0","mocha":"^5.2.0"},"scripts":{"test":"mocha"},"eslintConfig":{"extends":"lamansky","env":{"mocha":true}},"gitHead":"bc561a5cb335b3520497eeb426cdd357b4c4a30e","bugs":{"url":"https://github.com/lamansky/map-iter/issues"},"_id":"map-iter@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.1","_npmUser":{"name":"lamansky","email":"johnlamansky@gmail.com"},"dist":{"integrity":"sha512-beFeBgHAX6kFPgLl0bck+hEcnu1M0W2b7bqHryE3OI3wdZhgvKQppeDmq/Ys/NVYYJ4/Nz+B45gWaH56PURexQ==","shasum":"580a9de11dedcec6cbe48e856ffbe5b4d4ddf1db","tarball":"https://registry.npmjs.org/map-iter/-/map-iter-1.0.0.tgz","fileCount":4,"unpackedSize":3699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfXF7CRA9TVsSAnZWagAAIEwP/iQbuqanr+9A2XFqZKQQ\nUkuItViXcrprwHdIUHZfR3khsSzoZdKrFzFLe3tBrPNZ9kekzXO1jTrR5Q3k\nLE0hHDtMWlZls5/kC11al5xIe7LOvFgsJIj3C2h6sQZok4m29IgNAw2tu7o2\neGDUO8ZfCqaLe7P6p0IockM7iN4VPB+bDcckGiiI4POf9NrvceCMADhNywOR\nGgSMY2y48YcPxaXgrv4quSbPRq9v44x/+XUbb1UVEDOZLIZC/wsmUbb59Gdi\nGV0atO8e/vv2zrKjJM6HMMCi9fVC0pR8Fxc33+AvPqRHIeSDt28RLQGUbs2k\niVx06C0xZhDTLRxtfa6BR/HijI6NFHvOLBCTq32WbHJ6TpupR+ePNJMhBGgt\nDGsm2Ci/QBAolfhJ+BEMFLyT6f6iffqkezN60cjwDdrh3Pp8hh2JwYUMYnai\n0EVt5QQ2/sSF6lcZdEZnm+sCd63OL/qbPUM/s2Cv9k31y5nthOmVv/lb/8gH\n2gycmb1mWcUw5vWPTU/MQhJvsBr3CtpOcvvzo3JaHP3+LxJss+K1xEJXD7+w\nBzMVfCTaZlDrXxW1Aya6Vx1/sbrHg6WeaeVuTNlV0akj6U2ZgPZZkzeVXyuj\ngkC6jDx4FYOOO6rfDwc+rh7ZfYxGrekAFlomgiBnVAC7HUXbsD/hbInbLGP9\nJQYG\r\n=TQPT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfH2rmDGs2qbHAf2xbaVtb3I+jA9i+MsGCtSL+ufMX9AIgKLgWLdSIH2glf8QmXB0VHgT9W7loIT7ZYe21r4Qanjw="}]},"maintainers":[{"name":"lamansky","email":"johnlamansky@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/map-iter_1.0.0_1534947706677_0.7001992425377042"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-22T14:21:46.676Z","1.0.0":"2018-08-22T14:21:46.773Z","modified":"2022-05-08T19:09:19.083Z"},"maintainers":[{"name":"lamansky","email":"johnlamansky@gmail.com"}],"description":"Applies a callback to each value outputted by an iterable.","homepage":"https://github.com/lamansky/map-iter","keywords":["iterable","map","values","callback"],"repository":{"type":"git","url":"git+https://github.com/lamansky/map-iter.git"},"author":{"name":"Fr. John Lamansky","url":"lamansky.com"},"bugs":{"url":"https://github.com/lamansky/map-iter/issues"},"license":"MIT","readme":"# map-iter\n\nApplies a callback to each value outputted by an iterable.\n\n## Installation\n\nRequires [Node.js](https://nodejs.org/) 6.0.0 or above.\n\n```bash\nnpm i map-iter\n```\n\n## API\n\nThe module exports a single function.\n\n### Parameters\n\n1. `iter` (iterable)\n2. `cb` (function): The callback that, for each value iterated by `iter`, will be given two arguments: the value iterated, and an incrementing index counter that starts at zero. The return value of `cb` will be iterated in lieu of the original value.\n\n### Return Value\n\nAn iterator that outputs the return values of `cb`.\n\n## Example\n\n```javascript\nconst map = require('map-iter')\n\nconst iterator = map([1, 2, 3], x => x * 2)\niterator.next().value // 2\niterator.next().value // 4\niterator.next().value // 6\niterator.next().done // true\n```\n\n## Related\n\n* [filter-iter](https://github.com/lamansky/filter-iter): Filters an iterable object so that it only yields values which pass a test function.\n* [partition-iterable](https://github.com/lamansky/partition-iterable): Divides iterated values into those that match a filter and those that don’t.\n* [reduce-iterable](https://github.com/lamansky/reduce-iterable): Applies a function to iterated values to reduce them to a single value.\n* [unique-iterable](https://github.com/lamansky/unique-iterable): Filters an iterable object so it doesn’t yield the same value more than once.\n* [unique-iterable-by](https://github.com/lamansky/unique-iterable-by): Filters yielded values by testing uniqueness with an index, key, or callback.\n* [@lamansky/every](https://github.com/lamansky/every): Array.prototype.every() for iterables.\n* [@lamansky/some](https://github.com/lamansky/some): Array.prototype.some() for iterables.\n","readmeFilename":"readme.md"}