{"_id":"iterall","_rev":"12667","name":"iterall","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"time":{"modified":"2021-06-03T09:58:15.000Z","created":"2016-06-27T23:02:36.337Z","1.3.0":"2020-01-03T02:30:35.066Z","1.2.2":"2018-02-27T20:15:55.901Z","1.2.1":"2018-02-21T03:06:47.197Z","1.2.0":"2018-02-15T20:55:13.559Z","1.1.4":"2018-01-26T03:22:30.020Z","1.1.3":"2017-09-28T21:18:17.221Z","1.1.2":"2017-09-26T18:40:03.504Z","1.1.1":"2017-04-28T21:11:28.927Z","1.1.0":"2017-04-26T03:32:51.664Z","1.0.3":"2016-11-17T00:13:53.465Z","1.0.2":"2016-06-29T22:54:52.150Z","1.0.1":"2016-06-28T20:32:48.777Z","1.0.0":"2016-06-27T23:02:36.337Z"},"users":{"cmtegner":true,"iceriver2":true},"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"repository":{"type":"git","url":"git+https://github.com/leebyron/iterall.git"},"versions":{"1.3.0":{"name":"iterall","version":"1.3.0","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","license":"MIT","author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"homepage":"https://github.com/leebyron/iterall","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"repository":{"type":"git","url":"git+https://github.com/leebyron/iterall.git"},"keywords":["es6","iterator","iterable","polyfill","for-of"],"main":"index","module":"index.mjs","typings":"index.d.ts","_id":"iterall@1.3.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.2","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"afcb08492e2915cbd8a0884eb93a8c94d0d72fea","size":15251,"noattachment":false,"key":"/iterall/-/iterall-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.3.0.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall_1.3.0_1578018634920_0.7665476197808361"},"_hasShrinkwrap":false,"publish_time":1578018635066,"_cnpm_publish_time":1578018635066},"1.2.2":{"name":"iterall","version":"1.2.2","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","license":"MIT","author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"homepage":"https://github.com/leebyron/iterall","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"repository":{"type":"git","url":"git+https://github.com/leebyron/iterall.git"},"keywords":["es6","iterator","iterable","polyfill","for-of"],"main":"index","module":"index.mjs","typings":"index.d.ts","_id":"iterall@1.2.2","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"92d70deb8028e0c39ff3164fdbf4d8b088130cd7","size":14876,"noattachment":false,"key":"/iterall/-/iterall-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.2.2.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall_1.2.2_1519762554875_0.1892398026651394"},"_hasShrinkwrap":false,"publish_time":1519762555901,"_cnpm_publish_time":1519762555901},"1.2.1":{"name":"iterall","version":"1.2.1","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index","module":"index.mjs","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run build && npm run flow && npm run testonly && npm run testdocs","flow":"flow check --include-warnings","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi '*.{js,mjs}'","build":"babel index.mjs > index.js && cp index.mjs index.js.flow","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme index.mjs --parse-extension mjs -ds API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme index.mjs --parse-extension mjs -s API","travis":"npm run lint-check && npm run build && npm run flow && npm run testdocs && npm run testonly && nyc report --reporter=text-lcov | coveralls","preversion":"npm run test","prerelease":"npm run test"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.mjs","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"babel-cli":"6.26.0","babel-core":"6.26.0","babel-plugin-remove-comments":"2.0.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.0","coveralls":"3.0.0","documentation":"5.4.0","flow-bin":"0.66.0","nyc":"11.4.1","prettier":"1.10.2","regression":"2.0.1"},"babel":{"plugins":["remove-comments",["transform-es2015-modules-commonjs",{"strict":true}]]},"gitHead":"b6b77639f791381c0af083fc947f3f53a1181b98","_id":"iterall@1.2.1","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"59a347ae8001d2d4bc546b8487ca755d61849965","size":15521,"noattachment":false,"key":"/iterall/-/iterall-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.2.1.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall_1.2.1_1519182407122_0.8353188895298072"},"_hasShrinkwrap":false,"publish_time":1519182407197,"_cnpm_publish_time":1519182407197},"1.2.0":{"name":"iterall","version":"1.2.0","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index","module":"index.mjs","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run build && npm run flow && npm run testonly && npm run testdocs","flow":"flow check --include-warnings","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi '*.{js,mjs}'","build":"(echo '/* @flow */'; babel index.mjs) > index.js","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme index.js -ds API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme index.js -s API","travis":"npm run lint-check && npm run build && npm run flow && npm run testdocs && npm run testonly && nyc report --reporter=text-lcov | coveralls","preversion":"npm run test","prerelease":"npm run test"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.mjs","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"babel-cli":"6.26.0","babel-core":"6.26.0","babel-plugin-transform-es2015-modules-commonjs":"6.26.0","coveralls":"3.0.0","documentation":"5.4.0","flow-bin":"0.65.0","nyc":"11.4.1","prettier":"1.10.2","regression":"2.0.1"},"babel":{"plugins":[["transform-es2015-modules-commonjs",{"strict":true}]]},"gitHead":"d393a687fbf52f6bbe04e1000ec39e52415123fd","_id":"iterall@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"434e9f41f0b99911ab9c3d49d95f0e079176a2a2","size":15447,"noattachment":false,"key":"/iterall/-/iterall-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.2.0.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall_1.2.0_1518728113479_0.8647680197395295"},"_hasShrinkwrap":false,"publish_time":1518728113559,"_cnpm_publish_time":1518728113559},"1.1.4":{"name":"iterall","version":"1.1.4","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run flow && npm run testonly && npm run testdocs","flow":"flow check","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi '*.js'","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -ds API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -s API","travis":"npm run lint-check && npm run flow && npm run testdocs && npm run testonly && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"3.0.0","documentation":"5.3.5","flow-bin":"0.49.1","nyc":"11.4.1","prettier":"1.10.2","regression":"2.0.1"},"gitHead":"50d378b6cb701e9b47e856c59c317ac619c390d0","_id":"iterall@1.1.4","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"0db40d38fdcf53ae14dc8ec674e62ab190d52cfc","size":14594,"noattachment":false,"key":"/iterall/-/iterall-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.1.4.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall-1.1.4.tgz_1516936949897_0.7849158183671534"},"directories":{},"publish_time":1516936950020,"_hasShrinkwrap":false,"_cnpm_publish_time":1516936950020},"1.1.3":{"name":"iterall","version":"1.1.3","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run flow && npm run testonly && npm run testdocs","flow":"flow check","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi '*.js'","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run lint-check && npm run flow && npm run testdocs && npm run testonly && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.13.1","documentation":"4.0.0-beta.19","flow-bin":"0.49.1","nyc":"11.0.3","prettier":"1.5.2"},"gitHead":"a43fc763cc8bb1b3944bd85d8a9af3cb6e07babf","_id":"iterall@1.1.3","_npmVersion":"5.3.0","_nodeVersion":"8.0.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"1cbbff96204056dde6656e2ed2e2226d0e6d72c9","size":14914,"noattachment":false,"key":"/iterall/-/iterall-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.1.3.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall-1.1.3.tgz_1506633496678_0.020268271444365382"},"directories":{},"publish_time":1506633497221,"_hasShrinkwrap":false,"_cnpm_publish_time":1506633497221},"1.1.2":{"name":"iterall","version":"1.1.2","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run flow && npm run testonly && npm run testdocs","flow":"flow check","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi '*.js'","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run lint-check && npm run flow && npm run testdocs && npm run testonly && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.13.1","documentation":"4.0.0-beta.19","flow-bin":"0.49.1","nyc":"11.0.3","prettier":"1.5.2"},"gitHead":"e6d5e9dc1aafe8d4712f22fb34d7781612e77127","_id":"iterall@1.1.2","_npmVersion":"5.3.0","_nodeVersion":"8.0.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"413332b3cdb46f8f5ede57d6cd8e3ca8a9df8816","size":14901,"noattachment":false,"key":"/iterall/-/iterall-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.1.2.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iterall-1.1.2.tgz_1506451203340_0.7798121669329703"},"directories":{},"publish_time":1506451203504,"_hasShrinkwrap":false,"_cnpm_publish_time":1506451203504},"1.1.1":{"name":"iterall","version":"1.1.1","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run flow && npm run testonly && npm run testdocs","flow":"flow check","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi '*.js'","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run lint-check && npm run flow && npm run testdocs && npm run testonly && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.13.0","documentation":"4.0.0-beta5","flow-bin":"0.45.0","nyc":"10.2.0","prettier":"1.2.2"},"gitHead":"7e2dd5110f3bbe675725e51d68755e5a0f1c190d","_id":"iterall@1.1.1","_shasum":"f7f0af11e9a04ec6426260f5019d9fcca4d50214","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"f7f0af11e9a04ec6426260f5019d9fcca4d50214","size":14810,"noattachment":false,"key":"/iterall/-/iterall-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.1.1.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/iterall-1.1.1.tgz_1493413888622_0.10563171235844493"},"directories":{},"publish_time":1493413888927,"_hasShrinkwrap":false,"_cnpm_publish_time":1493413888927},"1.1.0":{"name":"iterall","version":"1.1.0","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","typings":"index.d.ts","scripts":{"test":"npm run lint && npm run flow && npm run testonly && npm run testdocs","flow":"flow check","lint":"npm run prettier -- --write","lint-check":"npm run prettier -- --list-different","prettier":"prettier --single-quote --no-semi --parser flow '*.{js,flow}'","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run lint-check && npm run flow && npm run test && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.13.0","documentation":"4.0.0-beta5","flow-bin":"0.44.2","nyc":"10.2.0","prettier":"1.2.2"},"gitHead":"a13db89f42ae23a125ea2b461ff32af29f17dcb4","_id":"iterall@1.1.0","_shasum":"e5d87f4e77337b58bdd6fe43de957fe21936cd11","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"e5d87f4e77337b58bdd6fe43de957fe21936cd11","size":14768,"noattachment":false,"key":"/iterall/-/iterall-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.1.0.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/iterall-1.1.0.tgz_1493177571417_0.22311838064342737"},"directories":{},"publish_time":1493177571664,"_cnpm_publish_time":1493177571664,"_hasShrinkwrap":false},"1.0.3":{"name":"iterall","version":"1.0.3","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","scripts":{"test":"npm run lint && npm run testonly && npm run testdocs","lint":"standard --verbose index.js test.js","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run test && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.11.9","documentation":"4.0.0-beta5","nyc":"6.6.1","standard":"7.1.2"},"gitHead":"8e515af7740325042ec7e1cd1f06dab7422545a2","_id":"iterall@1.0.3","_shasum":"e0b31958f835013c323ff0b10943829ac69aa4b7","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"e0b31958f835013c323ff0b10943829ac69aa4b7","size":10995,"noattachment":false,"key":"/iterall/-/iterall-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.0.3.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/iterall-1.0.3.tgz_1479341633227_0.8834833791479468"},"directories":{},"publish_time":1479341633465,"_cnpm_publish_time":1479341633465,"_hasShrinkwrap":false},"1.0.2":{"name":"iterall","version":"1.0.2","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","scripts":{"test":"npm run lint && npm run testonly && npm run testdocs","lint":"standard --verbose index.js test.js","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run test && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.11.9","documentation":"4.0.0-beta5","nyc":"6.6.1","standard":"7.1.2"},"gitHead":"8b55d27b3f386751ef3d7a84aa9ec38b1a30a3c8","_id":"iterall@1.0.2","_shasum":"41a2e96ce9eda5e61c767ee5dc312373bb046e91","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"41a2e96ce9eda5e61c767ee5dc312373bb046e91","size":6254,"noattachment":false,"key":"/iterall/-/iterall-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.0.2.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/iterall-1.0.2.tgz_1467240891724_0.4510333016514778"},"directories":{},"publish_time":1467240892150,"_cnpm_publish_time":1467240892150,"_hasShrinkwrap":false},"1.0.1":{"name":"iterall","version":"1.0.1","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","scripts":{"test":"npm run lint && npm run testonly && npm run testdocs","lint":"standard --verbose index.js test.js","testonly":"nyc --check-coverage --statements 100 node test.js","testdocs":"if [ \"$(documentation readme -dgs API | grep -vF 'up to date')\" ]; then echo 'Must run: npm run docs'; exit 1; fi;","docs":"documentation readme -gs API","travis":"npm run test && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.11.9","documentation":"4.0.0-beta5","nyc":"6.6.1","standard":"7.1.2"},"gitHead":"2dc710b623c4a704ab47c10e36bbf409f293b785","_id":"iterall@1.0.1","_shasum":"5f46fed611893117f1cfab0a5fd2d61e4fc1075b","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"5f46fed611893117f1cfab0a5fd2d61e4fc1075b","size":5841,"noattachment":false,"key":"/iterall/-/iterall-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.0.1.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/iterall-1.0.1.tgz_1467145968364_0.9514869069680572"},"directories":{},"publish_time":1467145968777,"_cnpm_publish_time":1467145968777,"_hasShrinkwrap":false},"1.0.0":{"name":"iterall","version":"1.0.0","description":"Minimal zero-dependency utilities for using JavaScript Iterables in all environments.","main":"index.js","scripts":{"test":"npm run lint && npm run testonly","lint":"standard --verbose index.js test.js","testonly":"nyc --check-coverage --statements 100 node test.js","docs":"documentation readme -g -s API","travis":"npm run test && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/leebyron/iterall.git"},"files":["index.js","index.js.flow","index.d.ts","README","LICENSE"],"keywords":["es6","iterator","iterable","polyfill","for-of"],"author":{"name":"Lee Byron","email":"lee@leebyron.com","url":"http://leebyron.com/"},"license":"MIT","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"homepage":"https://github.com/leebyron/iterall#readme","devDependencies":{"coveralls":"2.11.9","documentation":"4.0.0-beta5","nyc":"6.6.1","standard":"7.1.2"},"gitHead":"738f749a6a4b66ed5acbe58d3d9d88c77307763e","_id":"iterall@1.0.0","_shasum":"20f0d4bb81c895173106302ba5fba84256c8bdac","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"leebyron","email":"lee@leebyron.com"},"dist":{"shasum":"20f0d4bb81c895173106302ba5fba84256c8bdac","size":5324,"noattachment":false,"key":"/iterall/-/iterall-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iterall/download/iterall-1.0.0.tgz"},"maintainers":[{"name":"leebyron","email":"lee@leebyron.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/iterall-1.0.0.tgz_1467068554120_0.591198051115498"},"directories":{},"publish_time":1467068556337,"_cnpm_publish_time":1467068556337,"_hasShrinkwrap":false}},"readme":"# JavaScript [Iterators][] and [AsyncIterators][] for all!\n\n[![Build Status](https://travis-ci.org/leebyron/iterall.svg?branch=master)](https://travis-ci.org/leebyron/iterall) [![Coverage Status](https://coveralls.io/repos/github/leebyron/iterall/badge.svg?branch=master)](https://coveralls.io/github/leebyron/iterall?branch=master) ![710 bytes minified and gzipped](https://img.shields.io/badge/min%20gzip%20size-757%20B-blue.svg)\n\n`iterall` provides a few crucial utilities for implementing and working with\n[Iterables][iterators], [Async Iterables][asynciterators] and\n[Array-likes][array-like] in all JavaScript environments, even old versions of\nInternet Explorer, in a tiny library weighing well under 1KB when minified\nand gzipped.\n\nThis is a library for libraries. If your library takes Arrays as input, accept\nIterables instead. If your library implements a new data-structure, make\nit Iterable.\n\nWhen installed via `npm`, `iterall` comes complete with [Flow][] and\n[TypeScript][] definition files. Don't want to take the dependency? Feel free to\ncopy code directly from this repository.\n\n```js\n// Limited to only Arrays ????\nif (Array.isArray(thing)) {\n  thing.forEach(function (item, i) {\n    console.log('Index: ' + i, item)\n  })\n}\n\n// Accepts all Iterables and Array-likes, in any JavaScript environment! ????\nvar isCollection = require('iterall').isCollection\nvar forEach = require('iterall').forEach\n\nif (isCollection(thing)) {\n  forEach(thing, function (item, i) {\n    console.log('Index: ' + i, item)\n  })\n}\n\n// Accepts all AsyncIterators, in any JavaScript environment! ⏳\nvar forAwaitEach = require('iterall').forAwaitEach\n\nforAwaitEach(thing, function (item, i) {\n  console.log('Index: ' + i, item)\n}).then(function () {\n  console.log('Done')\n})\n```\n\n## Why use Iterators?\n\nFor most of JavaScript's history it has provided two collection data-structures:\nthe `Object` and the `Array`. These collections can conceptually describe nearly\nall data and so it's no suprise that libraries expecting lists of\nthings standardized on expecting and checking for an Array. This pattern even\nresulted in the addition of a new method in ES5: [`Array.isArray()`][isarray].\n\nAs JavaScript applications grew in complexity, moved to the [server][nodejs]\nwhere CPU is a constrained resource, faced new problems and implemented new\nalgorithms, new data-structures are often required. With options from\n[linked lists][linked list] to [HAMTs][hamt] developers can use what is most\nefficient and provides the right properties for their program.\n\nHowever none of these new data-structures can be used in libraries where an\n`Array` is expected, which means developers are often stuck between abandoning\ntheir favorite libraries or limiting their data-structure choices at the cost of\nefficiency or usefulness.\n\nTo enable many related data-structures to be used interchangably we need a\n_[protocol][]_, and luckily for us ES2015 introduced the\n[Iteration Protocols][iterators] to describe all list-like data-structures which\ncan be iterated. That includes not just the new-to-ES2015 [Map][] and [Set][]\ncollections but also existing ones like [arguments][], [NodeList][] and the\nvarious [TypedArray][], all of which return `false` for [`Array.isArray()`][isarray]\nand in ES2015 implement the [Iterator protocol][iterators].\n\nWhile Iterators are defined in ES2015, they _do not require_ ES2015 to work\ncorrectly. In fact, Iterators were first introduced in 2012 in [Firefox v17](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#Iterator_property_and_iterator_symbol). Rather than using [`Symbol.iterator`][symbol.iterator], they used the property name `\"@@iterator\"` (in fact, the ECMAScript\nspec still refers to well-known `Symbols` using this `@@` shorthand). By falling\nback to use `\"@@iterator\"` when `Symbol.iterator` is not defined, Iterators can\nbe both safely defined and used by _any version of JavaScript_.\n\nNot only were Iterables defined in ES2015, they were also implemented by the\nbuilt-in data-structures including [Array][array#@@iterator]. Older JavaScript\nenvironments do not implement `Array.prototype[@@iterator]()`, however this is\nonly a minor problem. JavaScript has another related and much older protocol:\n[Array-like]. A value is \"Array-like\" if it has a numeric `length` property and\nindexed access, but does not necessarily have methods like `.push()` or `.forEach()`.\nMuch like [`Array.from`][array.from], `iterall`'s `forEach()` and\n`createIterator()` methods also accept collections which are not Iterable but\nare Array-like. This means that `iterall` can be used with [Array][],\n[arguments][], [NodeList][], [TypedArray][] and other Array-like collections\nregardless of the JavaScript environment.\n\nWhen libraries only accept Arrays as input, they stick developers with a tough\nchoice: limit which data-structures can be used or limit the ability to use that\nlibrary. Accepting Iterables removes this false dichotomy, and allows libraries\nto be more generally useful. There's no need to limit to ES2015 environments and\nbleeding-edge browsers to accept `Iterable`.\n\nOnly using Arrays can limit the efficiency and usefulness of your application\ncode, but custom data-structures can often feel like a fish out of water in\nJavaScript programs, only working with code written specifically for it.\nProtocols like `Iterable` helps these new data-structures work with more\nlibraries and built-in JavaScript behavior. There's no need to limit to ES2015\nenvironments and bleeding-edge browsers to implement `Iterable`.\n\n## Why use AsyncIterators?\n\nIn the same way that `Iterator` provides a common interface for accessing many\ndifferent kinds of data-structures, `AsyncIterator` provides a common interface\nover an asynchronous sequence of values (similar to Stream or Observable).\n\nAsync Iterators are not yet an official part of JavaScript, however they're\na \"Stage 3\" proposal to be added, and browser vendors are\n[working on adding support](https://bugs.chromium.org/p/v8/issues/detail?id=5855).\nHowever, Async Iterators can be both safely defined and used today by\n_any version of JavaScript_, by using the utilities in `iterall`.\n\n## FAQ\n\n> Aren't Iterables slower than Arrays? I want the highest performance possible.\n\nArrays _are_ Iterables. Iterable is a protocol that Arrays adhere to in ES2015.\nIt's true that creating an Iterator and stepping through it can present some\noverhead compared to a simple for-loop or `array.forEach`. However `iterall`'s\n`forEach` will delegate directly to `array.forEach` and will use a for-loop for\nArray-like objects, ensuring the best performance for Arrays while still\nmaintaining support for all Iterables.\n\n> Should my library functions also return Iterables instead of Arrays? Won't\n> that be limiting?\n\nThat could definitely be limiting if you return some generic Iterable where you\ncould have returned an Array, and (depending on context) I wouldn't recommend\nyou stop returning Arrays from functions if that's what you're doing today.\nHowever if your functions are returning some collection data-structure that is\n_not_ an Array, you should certainly consider having them implement the\nIterable protocol so they can be more widely useful.\n\nHere are a few examples:\n\nIn [React][], render functions are expected to return view trees, where any\nnode (e.g. a `<ul>`) can have many children (e.g. many `<li>`). While it could\nexpect those children to always be represented as an Array, that would limit\nReact's usefulness - other data-structures couldn't be used. Instead, React\nexpects those children to be represented as an _Iterable_. That allows it to\ncontinue to accept Arrays, but also accept many other data-structures.\n\n[Immutable.js][] implements many new kinds of data-structures (including [HAMT])\nall of which implement _Iterable_, which allows them to be used in many of\nJavaScript's built-in functions, but also allows them to be used by many\nlibraries which accept Iterables, including React. Also, similar to\n[`Array.from`][array.from], Immutable.js's constructors accept not only Arrays,\nbut any _Iterable_, allowing you to build any of these new data-structures from\nany other data-structure.\n\n> Where are all the other functions like `map`, `filter`, and `reduce`?\n\nThose \"higher order\" collection functions are awesome, but they don't belong in\nthis library. Instead this library should be used as a basis for building such\na library (as it should be used for many other libraries). The `forEach`\nfunction provided by `iterall` can be used as the underpinning for these.\n\nAs an example:\n\n```js\nfunction reduce (collection, reducer, initial) {\n  var reduced = initial\n  forEach(collection, function (item) {\n    reduced = reducer(reduced, item)\n  })\n  return reduced\n}\n```\n\n> How do I break out of a `forEach` or `forAwaitEach` loop early?\n\nWhile `for of` and `for await of` loops allow breaking out of a loop early with\na `break` statement, the `forEach()` and `forAwaitEach()` functions (much like\nArray's `forEach`)  do not support early breaking.\n\nSimilar to the \"higher order\" functions described above, this library can be the\nbasis for this extended behavior. To support early break outs, you can use a\nwrapping function supporting early breaking by throwing a `BREAK` sentinel value\nfrom the callback and using a try/catch block to early break:\n\n```js\nconst BREAK = {}\n\nfunction forEachBreakable (collection, callback) {\n  try {\n    forEach(collection, callback)\n  } catch (error) {\n    if (error !== BREAK) {\n      throw error\n    }\n  }\n}\n\nasync function forAwaitEachBreakable (collection, callback) {\n  try {\n    await forAwaitEach(collection, callback)\n  } catch (error) {\n    if (error !== BREAK) {\n      throw error\n    }\n  }\n}\n\n// Example usages:\nforEachBreakable(obj, function (value) {\n  if (shouldBreakOn(value)) {\n    throw BREAK\n  }\n  console.log(value)\n})\n\nforAwaitEachBreakable(obj, async function (value) {\n  if (await shouldBreakOn(value)) {\n    throw BREAK\n  }\n  console.log(value)\n})\n```\n\nNote: This technique also works with the native Array `forEach` method!\n\n<!--\n\nNOTE TO CONTRIBUTORS\n\nThe API section below is AUTOMATICALLY GENERATED via `npm run docs`. Any direct\nedits to this section will cause Travis CI to report a failure. The source of\nthis documentation is index.js. Edit that file then run `npm run docs` to\nautomatically update README.md\n\n-->\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n-   [Iterable](#iterable)\n-   [Iterator](#iterator)\n-   [$$iterator](#iterator-1)\n    -   [Examples](#examples)\n-   [isIterable](#isiterable)\n    -   [Parameters](#parameters)\n    -   [Examples](#examples-1)\n-   [isArrayLike](#isarraylike)\n    -   [Parameters](#parameters-1)\n    -   [Examples](#examples-2)\n-   [isCollection](#iscollection)\n    -   [Parameters](#parameters-2)\n    -   [Examples](#examples-3)\n-   [getIterator](#getiterator)\n    -   [Parameters](#parameters-3)\n    -   [Examples](#examples-4)\n-   [getIteratorMethod](#getiteratormethod)\n    -   [Parameters](#parameters-4)\n    -   [Examples](#examples-5)\n-   [createIterator](#createiterator)\n    -   [Parameters](#parameters-5)\n    -   [Examples](#examples-6)\n-   [forEach](#foreach)\n    -   [Parameters](#parameters-6)\n    -   [Examples](#examples-7)\n-   [AsyncIterable](#asynciterable)\n-   [AsyncIterator](#asynciterator)\n-   [$$asyncIterator](#asynciterator-1)\n    -   [Examples](#examples-8)\n-   [isAsyncIterable](#isasynciterable)\n    -   [Parameters](#parameters-7)\n    -   [Examples](#examples-9)\n-   [getAsyncIterator](#getasynciterator)\n    -   [Parameters](#parameters-8)\n    -   [Examples](#examples-10)\n-   [getAsyncIteratorMethod](#getasynciteratormethod)\n    -   [Parameters](#parameters-9)\n    -   [Examples](#examples-11)\n-   [createAsyncIterator](#createasynciterator)\n    -   [Parameters](#parameters-10)\n    -   [Examples](#examples-12)\n-   [forAwaitEach](#forawaiteach)\n    -   [Parameters](#parameters-11)\n    -   [Examples](#examples-13)\n\n### Iterable\n\n-   **See: [MDN Iteration protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable)**\n\n[Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable)\nis a _protocol_ which when implemented allows a JavaScript object to define\ntheir iteration behavior, such as what values are looped over in a\n[`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of)\nloop or `iterall`'s `forEach` function. Many [built-in types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#Builtin_iterables)\nimplement the Iterable protocol, including `Array` and `Map`.\n\nWhile described by the [ES2015 version of JavaScript](http://www.ecma-international.org/ecma-262/6.0/#sec-iterable-interface)\nit can be utilized by any version of JavaScript.\n\n### Iterator\n\n-   **See: [MDN Iteration protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterator)**\n\n[Iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterator)\nis a _protocol_ which describes a standard way to produce a sequence of\nvalues, typically the values of the Iterable represented by this Iterator.\n\nWhile described by the [ES2015 version of JavaScript](http://www.ecma-international.org/ecma-262/6.0/#sec-iterator-interface)\nit can be utilized by any version of JavaScript.\n\n### $$iterator\n\nA property name to be used as the name of an Iterable's method responsible\nfor producing an Iterator, referred to as `@@iterator`. Typically represents\nthe value `Symbol.iterator` but falls back to the string `\"@@iterator\"` when\n`Symbol.iterator` is not defined.\n\nUse `$$iterator` for defining new Iterables instead of `Symbol.iterator`,\nbut do not use it for accessing existing Iterables, instead use\n[getIterator](#getiterator) or [isIterable](#isiterable).\n\nType: ([Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) \\| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))\n\n#### Examples\n\n```javascript\nvar $$iterator = require('iterall').$$iterator\n\nfunction Counter (to) {\n  this.to = to\n}\n\nCounter.prototype[$$iterator] = function () {\n  return {\n    to: this.to,\n    num: 0,\n    next () {\n      if (this.num >= this.to) {\n        return { value: undefined, done: true }\n      }\n      return { value: this.num++, done: false }\n    }\n  }\n}\n\nvar counter = new Counter(3)\nfor (var number of counter) {\n  console.log(number) // 0 ... 1 ... 2\n}\n```\n\n### isIterable\n\nReturns true if the provided object implements the Iterator protocol via\neither implementing a `Symbol.iterator` or `\"@@iterator\"` method.\n\n#### Parameters\n\n-   `obj`  A value which might implement the Iterable protocol.\n\n#### Examples\n\n```javascript\nvar isIterable = require('iterall').isIterable\nisIterable([ 1, 2, 3 ]) // true\nisIterable('ABC') // true\nisIterable({ length: 1, 0: 'Alpha' }) // false\nisIterable({ key: 'value' }) // false\nisIterable(new Map()) // true\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if Iterable.\n\n### isArrayLike\n\nReturns true if the provided object implements the Array-like protocol via\ndefining a positive-integer `length` property.\n\n#### Parameters\n\n-   `obj`  A value which might implement the Array-like protocol.\n\n#### Examples\n\n```javascript\nvar isArrayLike = require('iterall').isArrayLike\nisArrayLike([ 1, 2, 3 ]) // true\nisArrayLike('ABC') // true\nisArrayLike({ length: 1, 0: 'Alpha' }) // true\nisArrayLike({ key: 'value' }) // false\nisArrayLike(new Map()) // false\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if Array-like.\n\n### isCollection\n\nReturns true if the provided object is an Object (i.e. not a string literal)\nand is either Iterable or Array-like.\n\nThis may be used in place of [Array.isArray()][isarray] to determine if an\nobject should be iterated-over. It always excludes string literals and\nincludes Arrays (regardless of if it is Iterable). It also includes other\nArray-like objects such as NodeList, TypedArray, and Buffer.\n\n#### Parameters\n\n-   `obj`  An Object value which might implement the Iterable or Array-like protocols.\n\n#### Examples\n\n```javascript\nvar isCollection = require('iterall').isCollection\nisCollection([ 1, 2, 3 ]) // true\nisCollection('ABC') // false\nisCollection({ length: 1, 0: 'Alpha' }) // true\nisCollection({ key: 'value' }) // false\nisCollection(new Map()) // true\n```\n\n```javascript\nvar forEach = require('iterall').forEach\nif (isCollection(obj)) {\n  forEach(obj, function (value) {\n    console.log(value)\n  })\n}\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if Iterable or Array-like Object.\n\n### getIterator\n\nIf the provided object implements the Iterator protocol, its Iterator object\nis returned. Otherwise returns undefined.\n\n#### Parameters\n\n-   `iterable` **[Iterable](#iterable)&lt;T>** An Iterable object which is the source of an Iterator.\n\n#### Examples\n\n```javascript\nvar getIterator = require('iterall').getIterator\nvar iterator = getIterator([ 1, 2, 3 ])\niterator.next() // { value: 1, done: false }\niterator.next() // { value: 2, done: false }\niterator.next() // { value: 3, done: false }\niterator.next() // { value: undefined, done: true }\n```\n\nReturns **[Iterator](#iterator)&lt;T>** new Iterator instance.\n\n### getIteratorMethod\n\nIf the provided object implements the Iterator protocol, the method\nresponsible for producing its Iterator object is returned.\n\nThis is used in rare cases for performance tuning. This method must be called\nwith obj as the contextual this-argument.\n\n#### Parameters\n\n-   `iterable` **[Iterable](#iterable)&lt;T>** An Iterable object which defines an `@@iterator` method.\n\n#### Examples\n\n```javascript\nvar getIteratorMethod = require('iterall').getIteratorMethod\nvar myArray = [ 1, 2, 3 ]\nvar method = getIteratorMethod(myArray)\nif (method) {\n  var iterator = method.call(myArray)\n}\n```\n\nReturns **function (): [Iterator](#iterator)&lt;T>** `@@iterator` method.\n\n### createIterator\n\nSimilar to [getIterator](#getiterator), this method returns a new Iterator given an\nIterable. However it will also create an Iterator for a non-Iterable\nArray-like collection, such as Array in a non-ES2015 environment.\n\n`createIterator` is complimentary to `forEach`, but allows a \"pull\"-based\niteration as opposed to `forEach`'s \"push\"-based iteration.\n\n`createIterator` produces an Iterator for Array-likes with the same behavior\nas ArrayIteratorPrototype described in the ECMAScript specification, and\ndoes _not_ skip over \"holes\".\n\n#### Parameters\n\n-   `collection` **([Iterable](#iterable)&lt;T> | {length: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)})** An Iterable or Array-like object to produce an Iterator.\n\n#### Examples\n\n```javascript\nvar createIterator = require('iterall').createIterator\n\nvar myArraylike = { length: 3, 0: 'Alpha', 1: 'Bravo', 2: 'Charlie' }\nvar iterator = createIterator(myArraylike)\niterator.next() // { value: 'Alpha', done: false }\niterator.next() // { value: 'Bravo', done: false }\niterator.next() // { value: 'Charlie', done: false }\niterator.next() // { value: undefined, done: true }\n```\n\nReturns **[Iterator](#iterator)&lt;T>** new Iterator instance.\n\n### forEach\n\nGiven an object which either implements the Iterable protocol or is\nArray-like, iterate over it, calling the `callback` at each iteration.\n\nUse `forEach` where you would expect to use a `for ... of` loop in ES6.\nHowever `forEach` adheres to the behavior of [Array#forEach][] described in\nthe ECMAScript specification, skipping over \"holes\" in Array-likes. It will\nalso delegate to a `forEach` method on `collection` if one is defined,\nensuring native performance for `Arrays`.\n\nSimilar to [Array#forEach][], the `callback` function accepts three\narguments, and is provided with `thisArg` as the calling context.\n\nNote: providing an infinite Iterator to forEach will produce an error.\n\n[array#foreach]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n\n#### Parameters\n\n-   `collection` **([Iterable](#iterable)&lt;T> | {length: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)})** The Iterable or array to iterate over.\n-   `callback` **function (T, [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** Function to execute for each iteration, taking up to three arguments\n-   `thisArg`  Optional. Value to use as `this` when executing `callback`.\n\n#### Examples\n\n```javascript\nvar forEach = require('iterall').forEach\n\nforEach(myIterable, function (value, index, iterable) {\n  console.log(value, index, iterable === myIterable)\n})\n```\n\n```javascript\n// ES6:\nfor (let value of myIterable) {\n  console.log(value)\n}\n\n// Any JavaScript environment:\nforEach(myIterable, function (value) {\n  console.log(value)\n})\n```\n\n### AsyncIterable\n\n-   **See: [Async Iteration Proposal](https://tc39.github.io/proposal-async-iteration/#sec-asynciterable-interface)**\n\n[AsyncIterable](https://tc39.github.io/proposal-async-iteration/#sec-asynciterable-interface)\nis a _protocol_ which when implemented allows a JavaScript object to define\nan asynchronous iteration behavior, such as what values are looped over in\na [`for-await-of`](https://tc39.github.io/proposal-async-iteration/#sec-for-in-and-for-of-statements)\nloop or `iterall`'s [forAwaitEach](#forawaiteach) function.\n\nWhile described as a proposed addition to the [ES2017 version of JavaScript](https://tc39.github.io/proposal-async-iteration/)\nit can be utilized by any version of JavaScript.\n\n### AsyncIterator\n\n-   **See: [Async Iteration Proposal](https://tc39.github.io/proposal-async-iteration/#sec-asynciterator-interface)**\n\n[AsyncIterator](https://tc39.github.io/proposal-async-iteration/#sec-asynciterator-interface)\nis a _protocol_ which describes a standard way to produce and consume an\nasynchronous sequence of values, typically the values of the\n[AsyncIterable](#asynciterable) represented by this [AsyncIterator](#asynciterator).\n\nAsyncIterator is similar to Observable or Stream. Like an [Iterator](#iterator) it\nalso as a `next()` method, however instead of an IteratorResult,\ncalling this method returns a [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) for a IteratorResult.\n\nWhile described as a proposed addition to the [ES2017 version of JavaScript](https://tc39.github.io/proposal-async-iteration/)\nit can be utilized by any version of JavaScript.\n\n### $$asyncIterator\n\nA property name to be used as the name of an AsyncIterable's method\nresponsible for producing an Iterator, referred to as `@@asyncIterator`.\nTypically represents the value `Symbol.asyncIterator` but falls back to the\nstring `\"@@asyncIterator\"` when `Symbol.asyncIterator` is not defined.\n\nUse `$$asyncIterator` for defining new AsyncIterables instead of\n`Symbol.asyncIterator`, but do not use it for accessing existing Iterables,\ninstead use [getAsyncIterator](#getasynciterator) or [isAsyncIterable](#isasynciterable).\n\nType: ([Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) \\| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))\n\n#### Examples\n\n```javascript\nvar $$asyncIterator = require('iterall').$$asyncIterator\n\nfunction Chirper (to) {\n  this.to = to\n}\n\nChirper.prototype[$$asyncIterator] = function () {\n  return {\n    to: this.to,\n    num: 0,\n    next () {\n      return new Promise(resolve => {\n        if (this.num >= this.to) {\n          resolve({ value: undefined, done: true })\n        } else {\n          setTimeout(() => {\n            resolve({ value: this.num++, done: false })\n          }, 1000)\n        }\n      })\n    }\n  }\n}\n\nvar chirper = new Chirper(3)\nfor await (var number of chirper) {\n  console.log(number) // 0 ...wait... 1 ...wait... 2\n}\n```\n\n### isAsyncIterable\n\nReturns true if the provided object implements the AsyncIterator protocol via\neither implementing a `Symbol.asyncIterator` or `\"@@asyncIterator\"` method.\n\n#### Parameters\n\n-   `obj`  A value which might implement the AsyncIterable protocol.\n\n#### Examples\n\n```javascript\nvar isAsyncIterable = require('iterall').isAsyncIterable\nisAsyncIterable(myStream) // true\nisAsyncIterable('ABC') // false\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if AsyncIterable.\n\n### getAsyncIterator\n\nIf the provided object implements the AsyncIterator protocol, its\nAsyncIterator object is returned. Otherwise returns undefined.\n\n#### Parameters\n\n-   `asyncIterable` **[AsyncIterable](#asynciterable)&lt;T>** An AsyncIterable object which is the source of an AsyncIterator.\n\n#### Examples\n\n```javascript\nvar getAsyncIterator = require('iterall').getAsyncIterator\nvar asyncIterator = getAsyncIterator(myStream)\nasyncIterator.next().then(console.log) // { value: 1, done: false }\nasyncIterator.next().then(console.log) // { value: 2, done: false }\nasyncIterator.next().then(console.log) // { value: 3, done: false }\nasyncIterator.next().then(console.log) // { value: undefined, done: true }\n```\n\nReturns **[AsyncIterator](#asynciterator)&lt;T>** new AsyncIterator instance.\n\n### getAsyncIteratorMethod\n\nIf the provided object implements the AsyncIterator protocol, the method\nresponsible for producing its AsyncIterator object is returned.\n\nThis is used in rare cases for performance tuning. This method must be called\nwith obj as the contextual this-argument.\n\n#### Parameters\n\n-   `asyncIterable` **[AsyncIterable](#asynciterable)&lt;T>** An AsyncIterable object which defines an `@@asyncIterator` method.\n\n#### Examples\n\n```javascript\nvar getAsyncIteratorMethod = require('iterall').getAsyncIteratorMethod\nvar method = getAsyncIteratorMethod(myStream)\nif (method) {\n  var asyncIterator = method.call(myStream)\n}\n```\n\nReturns **function (): [AsyncIterator](#asynciterator)&lt;T>** `@@asyncIterator` method.\n\n### createAsyncIterator\n\nSimilar to [getAsyncIterator](#getasynciterator), this method returns a new AsyncIterator\ngiven an AsyncIterable. However it will also create an AsyncIterator for a\nnon-async Iterable as well as non-Iterable Array-like collection, such as\nArray in a pre-ES2015 environment.\n\n`createAsyncIterator` is complimentary to `forAwaitEach`, but allows a\nbuffering \"pull\"-based iteration as opposed to `forAwaitEach`'s\n\"push\"-based iteration.\n\n`createAsyncIterator` produces an AsyncIterator for non-async Iterables as\ndescribed in the ECMAScript proposal [Async-from-Sync Iterator Objects](https://tc39.github.io/proposal-async-iteration/#sec-async-from-sync-iterator-objects).\n\n> Note: Creating `AsyncIterator`s requires the existence of `Promise`.\n> While `Promise` has been available in modern browsers for a number of\n> years, legacy browsers (like IE 11) may require a polyfill.\n\n#### Parameters\n\n-   `source` **([AsyncIterable](#asynciterable)&lt;T> | [Iterable](#iterable)&lt;T> | {length: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)})** An AsyncIterable, Iterable, or Array-like object to produce an Iterator.\n\n#### Examples\n\n```javascript\nvar createAsyncIterator = require('iterall').createAsyncIterator\n\nvar myArraylike = { length: 3, 0: 'Alpha', 1: 'Bravo', 2: 'Charlie' }\nvar iterator = createAsyncIterator(myArraylike)\niterator.next().then(console.log) // { value: 'Alpha', done: false }\niterator.next().then(console.log) // { value: 'Bravo', done: false }\niterator.next().then(console.log) // { value: 'Charlie', done: false }\niterator.next().then(console.log) // { value: undefined, done: true }\n```\n\nReturns **[AsyncIterator](#asynciterator)&lt;T>** new AsyncIterator instance.\n\n### forAwaitEach\n\nGiven an object which either implements the AsyncIterable protocol or is\nArray-like, iterate over it, calling the `callback` at each iteration.\n\nUse `forAwaitEach` where you would expect to use a [for-await-of](https://tc39.github.io/proposal-async-iteration/#sec-for-in-and-for-of-statements) loop.\n\nSimilar to [Array#forEach][], the `callback` function accepts three\narguments, and is provided with `thisArg` as the calling context.\n\n> Note: Using `forAwaitEach` requires the existence of `Promise`.\n> While `Promise` has been available in modern browsers for a number of\n> years, legacy browsers (like IE 11) may require a polyfill.\n\n#### Parameters\n\n-   `source` **([AsyncIterable](#asynciterable)&lt;T> | [Iterable](#iterable)&lt;([Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;T> | T)> | {length: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)})** The AsyncIterable or array to iterate over.\n-   `callback` **function (T, [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** Function to execute for each iteration, taking up to three arguments\n-   `thisArg`  Optional. Value to use as `this` when executing `callback`.\n\n#### Examples\n\n```javascript\nvar forAwaitEach = require('iterall').forAwaitEach\n\nforAwaitEach(myIterable, function (value, index, iterable) {\n  console.log(value, index, iterable === myIterable)\n})\n```\n\n```javascript\n// ES2017:\nfor await (let value of myAsyncIterable) {\n  console.log(await doSomethingAsync(value))\n}\nconsole.log('done')\n\n// Any JavaScript environment:\nforAwaitEach(myAsyncIterable, function (value) {\n  return doSomethingAsync(value).then(console.log)\n}).then(function () {\n  console.log('done')\n})\n```\n\n## Contributing\n\nContributions are welcome and encouraged!\n\nRemember that this library is designed to be small, straight-forward, and\nwell-tested. The value of new additional features will be weighed against their\nsize. This library also seeks to leverage and mirror the\n[ECMAScript specification][] in its behavior as much as possible and reasonable.\n\nThis repository has far more documentation and explanation than code, and it is\nexpected that the majority of contributions will come in the form of improving\nthese.\n\n<!-- Appendix -->\n\n[arguments]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments\n\n[array#@@iterator]: (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator)\n\n[array-like]: http://www.2ality.com/2013/05/quirk-array-like-objects.html\n\n[array.from]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from\n\n[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n\n[ecmascript specification]: http://www.ecma-international.org/ecma-262/6.0/\n\n[flow]: https://flowtype.org/\n\n[hamt]: https://en.wikipedia.org/wiki/Hash_array_mapped_trie\n\n[isarray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray\n\n[iterators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols\n\n[asynciterators]: https://tc39.github.io/proposal-async-iteration/\n\n[linked list]: https://en.wikipedia.org/wiki/Linked_list\n\n[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n\n[nodejs]: https://nodejs.org/\n\n[nodelist]: https://developer.mozilla.org/en-US/docs/Web/API/NodeList\n\n[protocol]: https://en.wikipedia.org/wiki/Protocol_(object-oriented_programming)\n\n[react]: https://facebook.github.io/react/\n\n[set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n\n[symbol.iterator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator\n\n[typedarray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\n\n[typescript]: http://www.typescriptlang.org/\n\n[immutable.js]: http://facebook.github.io/immutable-js/\n","_attachments":{},"homepage":"https://github.com/leebyron/iterall","bugs":{"url":"https://github.com/leebyron/iterall/issues"},"license":"MIT"}