{"_id":"array-iterate","_rev":"266887","name":"array-iterate","description":"`Array#forEach()` but it’s possible to define where to move to next","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"wooorm","email":""}],"time":{"modified":"2023-03-27T19:06:06.000Z","created":"2014-11-12T17:23:09.109Z","2.0.1":"2021-10-27T15:45:22.963Z","2.0.0":"2021-03-09T11:09:29.734Z","1.1.4":"2020-01-26T14:43:46.675Z","1.1.3":"2019-05-06T10:47:28.236Z","1.1.2":"2018-04-14T11:18:54.571Z","1.1.1":"2017-06-20T10:03:27.057Z","1.1.0":"2016-08-08T09:44:48.519Z","1.0.0":"2015-08-23T11:20:58.549Z","0.1.0":"2014-12-05T13:19:16.584Z","0.0.1":"2014-11-12T17:23:09.109Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"versions":{"2.0.1":{"name":"array-iterate","version":"2.0.1","description":"`Array#forEach()` but it’s possible to define where to move to next","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.45.0"},"scripts":{"prepublishOnly":"npm run build && npm run format","build":"rimraf \"lib/**/*.d.ts\" \"test.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"4ac6168000b5a1fabd59eb25abaaf5c21336cef0","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@2.0.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"6efd43f8295b3fee06251d3d62ead4bd9805dd24","size":4155,"noattachment":false,"key":"/array-iterate/-/array-iterate-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-2.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-iterate_2.0.1_1635349522809_0.37812124775238476"},"_hasShrinkwrap":false,"publish_time":1635349522963,"_cnpm_publish_time":1635349522963,"_cnpmcore_publish_time":"2021-12-16T15:16:01.867Z"},"2.0.0":{"name":"array-iterate","version":"2.0.0","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","typescript":"^4.0.0","xo":"^0.38.0"},"scripts":{"prepublishOnly":"npm run build && npm run format","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","prebuild":"rimraf \"*.d.ts\"","build":"tsc","test-api":"node test","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-var":"off","prefer-arrow-callback":"off","unicorn/no-this-assignment":"off","unicorn/prefer-type-error":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"7a5f9412112333a92692544fa00d75ea6f39386e","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@2.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.6.1","dist":{"shasum":"901a2297f878c1d6ec5be4fea5e7ad16fa37c3e3","size":3301,"noattachment":false,"key":"/array-iterate/-/array-iterate-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-2.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-iterate_2.0.0_1615288169539_0.7512623195363055"},"_hasShrinkwrap":false,"publish_time":1615288169734,"_cnpm_publish_time":1615288169734},"1.1.4":{"name":"array-iterate","version":"1.1.4","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^15.0.0","prettier":"^1.0.0","remark-cli":"^7.0.0","remark-preset-wooorm":"^6.0.0","tape":"^4.0.0","tinyify":"^2.0.0","xo":"^0.25.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s arrayIterate -o array-iterate.js","build-mangle":"browserify . -s arrayIterate -p tinyify -o array-iterate.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/prefer-type-error":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"gitHead":"1e0468b08d00e3d4684edf33bbe4d3a981109f06","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@1.1.4","_nodeVersion":"13.0.1","_npmVersion":"6.13.6","dist":{"shasum":"add1522e9dd9749bb41152d08b845bd08d6af8b7","size":2820,"noattachment":false,"key":"/array-iterate/-/array-iterate-1.1.4.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-1.1.4.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-iterate_1.1.4_1580049826564_0.7831374862225424"},"_hasShrinkwrap":false,"publish_time":1580049826675,"_cnpm_publish_time":1580049826675},"1.1.3":{"name":"array-iterate","version":"1.1.3","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","nyc":"^14.0.0","prettier":"^1.12.0","remark-cli":"^6.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.4.0","tinyify":"^2.5.0","xo":"^0.24.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s arrayIterate -o array-iterate.js","build-mangle":"browserify . -s arrayIterate -p tinyify -o array-iterate.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/prefer-type-error":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"gitHead":"1f6ae05f2f2cb32db0be0a235acc506d5431650c","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@1.1.3","_nodeVersion":"11.9.0","_npmVersion":"6.9.0","dist":{"shasum":"b116bdb1e37f3c3fec13acdfb91ac829f122543c","size":2803,"noattachment":false,"key":"/array-iterate/-/array-iterate-1.1.3.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-1.1.3.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-iterate_1.1.3_1557139648111_0.5900435425941435"},"_hasShrinkwrap":false,"publish_time":1557139648236,"_cnpm_publish_time":1557139648236},"1.1.2":{"name":"array-iterate","version":"1.1.2","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^16.0.0","esmangle":"^1.0.0","nyc":"^11.0.0","prettier":"^1.12.0","remark-cli":"^5.0.0","remark-preset-wooorm":"^4.0.0","tape":"^4.4.0","xo":"^0.20.0"},"scripts":{"format":"remark . -qfo && prettier --write '**/*.js' && xo --fix","build-bundle":"browserify index.js -s arrayIterate > array-iterate.js","build-mangle":"esmangle array-iterate.js > array-iterate.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"no-var":"off","prefer-arrow-callback":"off","guard-for-in":"off","unicorn/prefer-type-error":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"gitHead":"add581e1d1c405a1b342b307839588a5702f6c9a","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@1.1.2","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"f66a57e84426f8097f4197fbb6c051b8e5cdf7d8","size":2765,"noattachment":false,"key":"/array-iterate/-/array-iterate-1.1.2.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-1.1.2.tgz"},"maintainers":[{"name":"wooorm","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-iterate_1.1.2_1523704734477_0.2727673759563265"},"_hasShrinkwrap":false,"publish_time":1523704734571,"_cnpm_publish_time":1523704734571},"1.1.1":{"name":"array-iterate","version":"1.1.1","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"files":["index.js"],"dependencies":{},"devDependencies":{"browserify":"^14.0.0","esmangle":"^1.0.0","nyc":"^11.0.0","remark-cli":"^3.0.0","remark-preset-wooorm":"^3.0.0","tape":"^4.4.0","xo":"^0.18.0"},"scripts":{"build-md":"remark . -qfo","build-bundle":"browserify index.js -s arrayIterate > array-iterate.js","build-mangle":"esmangle array-iterate.js > array-iterate.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"esnext":false,"rules":{"guard-for-in":"off","unicorn/prefer-type-error":"off"},"ignores":["array-iterate.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"2c6be51dbc38c14c82741d4fdf08d39f8a0b1323","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@1.1.1","_shasum":"865bf7f8af39d6b0982c60902914ac76bc0108f6","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"865bf7f8af39d6b0982c60902914ac76bc0108f6","size":2688,"noattachment":false,"key":"/array-iterate/-/array-iterate-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-1.1.1.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-iterate-1.1.1.tgz_1497953006046_0.12903842725791037"},"directories":{},"publish_time":1497953007057,"_cnpm_publish_time":1497953007057,"_hasShrinkwrap":false},"1.1.0":{"name":"array-iterate","version":"1.1.0","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"dependencies":{"has":"^1.0.1"},"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"engines":{"node":">=0.11.0"},"files":["index.js"],"devDependencies":{"browserify":"^13.0.0","esmangle":"^1.0.0","nyc":"^7.1.0","remark-cli":"^1.0.0","remark-comment-config":"^4.0.0","remark-github":"^5.0.0","remark-lint":"^4.0.0","remark-toc":"^3.0.0","remark-validate-links":"^4.0.0","tape":"^4.4.0","xo":"^0.16.0"},"scripts":{"build-md":"remark . --quiet --frail","build-bundle":"browserify index.js -s arrayIterate > array-iterate.js","build-mangle":"esmangle array-iterate.js > array-iterate.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint":"xo","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run build && npm run lint && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"xo":{"space":true,"rules":{"guard-for-in":"off","max-lines":"off"},"ignores":["array-iterate.js","array-iterate.min.js"]},"remarkConfig":{"output":true,"plugins":{"comment-config":null,"lint":{"heading-increment":false,"no-duplicate-headings":false,"list-item-spacing":false},"github":null,"toc":{"tight":true,"maxDepth":3},"validate-links":null},"settings":{"bullet":"*"}},"gitHead":"97471f01e1e76c8604e870fd6cdac1d90383f824","homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@1.1.0","_shasum":"4f13148ffffa5f2756b50460e5eac8eed31a14e6","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"4f13148ffffa5f2756b50460e5eac8eed31a14e6","size":3148,"noattachment":false,"key":"/array-iterate/-/array-iterate-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-1.1.0.tgz"},"maintainers":[{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/array-iterate-1.1.0.tgz_1470649486601_0.29966444545425475"},"directories":{},"publish_time":1470649488519,"_cnpm_publish_time":1470649488519,"_hasShrinkwrap":false},"1.0.0":{"name":"array-iterate","version":"1.0.0","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"git+https://github.com/wooorm/array-iterate.git"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com"},"files":["index.js"],"devDependencies":{"browserify":"^11.0.0","eslint":"^1.0.0","esmangle":"^1.0.0","istanbul":"^0.3.0","jscs":"^2.0.0","jscs-jsdoc":"^1.0.0","mdast":"^1.0.0","mdast-comment-config":"^1.0.0","mdast-github":"^1.0.0","mdast-lint":"^1.0.0","mdast-slug":"^1.0.0","mdast-validate-links":"^1.0.0","mocha":"^2.0.0"},"scripts":{"test-api":"mocha --check-leaks test.js","test-coverage":"istanbul cover _mocha -- test.js","test-travis":"npm run test-coverage","test":"npm run test-api","lint-api":"eslint .","lint-style":"jscs --reporter inline .","lint":"npm run lint-api && npm run lint-style","make":"npm run lint && npm run test-coverage","bundle":"browserify index.js --no-builtins -s arrayIterate > array-iterate.js","postbundle":"esmangle array-iterate.js > array-iterate.min.js","build-md":"mdast . --quiet","build":"npm run bundle && npm run build-md"},"gitHead":"8a8d4d42e175db72c0fa206dfc191d13dfe63a60","bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"homepage":"https://github.com/wooorm/array-iterate#readme","_id":"array-iterate@1.0.0","_shasum":"67cf333391a0fda11bb38c2ec00a104cafdb2ce3","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"67cf333391a0fda11bb38c2ec00a104cafdb2ce3","size":3092,"noattachment":false,"key":"/array-iterate/-/array-iterate-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-1.0.0.tgz"},"maintainers":[{"name":"wooorm","email":""}],"directories":{},"publish_time":1440328858549,"_cnpm_publish_time":1440328858549,"_hasShrinkwrap":false},"0.1.0":{"name":"array-iterate","version":"0.1.0","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"https://github.com/wooorm/array-iterate.git"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com"},"devDependencies":{"eslint":"^0.10.0","istanbul":"^0.3.0","jscs":"^1.0.0","mocha":"^2.0.0"},"scripts":{"test":"_mocha --reporter spec --check-leaks -u exports test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js","coverage":"istanbul cover node_modules/.bin/_mocha -- -- test.js","lint-api":"eslint index.js","lint-test":"eslint test.js --env mocha","lint-style":"jscs index.js test.js --reporter=inline","lint":"npm run lint-api && npm run lint-test && npm run lint-style","make":"npm run lint && npm run coverage"},"gitHead":"5d718b8f9d55e81b9cc5c942f39772cd472a4a17","bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"homepage":"https://github.com/wooorm/array-iterate","_id":"array-iterate@0.1.0","_shasum":"df308d9fc3940b886a3f4d053557fb5ca4d798d2","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"maintainers":[{"name":"wooorm","email":""}],"dist":{"shasum":"df308d9fc3940b886a3f4d053557fb5ca4d798d2","size":2383,"noattachment":false,"key":"/array-iterate/-/array-iterate-0.1.0.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-0.1.0.tgz"},"directories":{},"publish_time":1417785556584,"_cnpm_publish_time":1417785556584,"_hasShrinkwrap":false},"0.0.1":{"name":"array-iterate","version":"0.0.1","description":"forEach with the possibility to change the next position","license":"MIT","keywords":["array","list","iterate","walk"],"repository":{"type":"git","url":"https://github.com/wooorm/array-iterate.git"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com"},"devDependencies":{"eslint":"^0.9.0","istanbul":"^0.3.0","jscs":"^1.0.0","mocha":"^2.0.0"},"scripts":{"test":"_mocha --reporter spec --check-leaks -u exports test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js","coverage":"istanbul cover node_modules/.bin/_mocha -- -- test.js","lint":"npm run-script lint-api && npm run-script lint-test && npm run-script lint-style","lint-api":"eslint index.js","lint-test":"eslint test.js --env mocha","lint-style":"jscs index.js test.js --reporter=inline","make":"npm run-script lint && npm run-script coverage"},"gitHead":"228e8321787721c31f97fbb91279dbc20e7c9c99","bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"homepage":"https://github.com/wooorm/array-iterate","_id":"array-iterate@0.0.1","_shasum":"72915c2d6fdfe0615cf1c94996c10150f09bf792","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"maintainers":[{"name":"wooorm","email":""}],"dist":{"shasum":"72915c2d6fdfe0615cf1c94996c10150f09bf792","size":2378,"noattachment":false,"key":"/array-iterate/-/array-iterate-0.0.1.tgz","tarball":"http://name.csiicloud.com:7001/array-iterate/download/array-iterate-0.0.1.tgz"},"directories":{},"publish_time":1415812989109,"_cnpm_publish_time":1415812989109,"_hasShrinkwrap":false}},"readme":"# array-iterate\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\n[`Array#forEach()`][foreach] but it’s possible to define where to move to next.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`arrayIterate(values, callbackFn[, thisArg])`](#arrayiteratevalues-callbackfn-thisarg)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nA tiny package that works just like `forEach`, with one small difference.\n\n## When should I use this?\n\nYou can use this if for some weird reason—like I did—you have to sometimes\nskip a few places ahead or backwards when moving through an array.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:\n\n```sh\nnpm install array-iterate\n```\n\nIn Deno with [Skypack][]:\n\n```js\nimport {arrayIterate} from 'https://cdn.skypack.dev/array-iterate@2?dts'\n```\n\nIn browsers with [Skypack][]:\n\n```html\n<script type=\"module\">\n  import {arrayIterate} from 'https://cdn.skypack.dev/array-iterate@2?min'\n</script>\n```\n\n## Use\n\n```js\nimport {arrayIterate} from 'array-iterate'\n\nlet first = true\n\narrayIterate(\n  [1, 2, 3, 4],\n  (value, index, values) => {\n    console.log(this, value, index, values)\n\n    // Repeat once.\n    if (first && index + 1 === values.length) {\n      first = false\n      return 0\n    }\n  },\n  {hello: 'world'}\n)\n```\n\nYields:\n\n```js\n{hello: 'world'}, 1, 0, [1, 2, 3, 4]\n{hello: 'world'}, 2, 1, [1, 2, 3, 4]\n{hello: 'world'}, 3, 2, [1, 2, 3, 4]\n{hello: 'world'}, 4, 3, [1, 2, 3, 4]\n{hello: 'world'}, 1, 0, [1, 2, 3, 4]\n{hello: 'world'}, 2, 1, [1, 2, 3, 4]\n{hello: 'world'}, 3, 2, [1, 2, 3, 4]\n{hello: 'world'}, 4, 3, [1, 2, 3, 4]\n```\n\n## API\n\nThis package exports the following identifiers: `arrayIterate`.\nThere is no default export.\n\n### `arrayIterate(values, callbackFn[, thisArg])`\n\nPerform the specified action for each element in an array (just like\n[`Array#forEach()`][foreach]).\nWhen `callbackFn` returns a `number`, moves to the element at that index\nnext.\n\n###### Parameters\n\n*   `values` (`Array<*>`)\n    — values to iterate over\n*   `callbackFn` (`Function`)\n    — function called for each element, can return the `index` to move to next\n*   `thisArg` (`*`, optional)\n    — optional object assigned as `this` in `callbackFn`\n\n###### Returns\n\n`undefined`.\n\n#### `function callbackFn(value, index, values)`\n\nCallback given to `iterate`.\n\n###### Parameters\n\n*   `this` (`*`)\n    — context object when given as `thisArg` to `arrayIterate` or `undefined`\n*   `value` (`*`)\n    — element in array\n*   `index` (`number`)\n    — index of `value` in `values`\n*   `values` (`Array.<*>`)\n    — list\n\n###### Returns\n\n`number` or `undefined` — the `index` to move to next.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nThere is also a `CallbackFn` type export that represents the callback function.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 12.20+, 14.14+, and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Security\n\nThis package is safe, assuming that you don’t create an infinite loop\nby keeping on repeating.\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/array-iterate/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/array-iterate/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/array-iterate.svg\n\n[coverage]: https://codecov.io/github/wooorm/array-iterate\n\n[downloads-badge]: https://img.shields.io/npm/dm/array-iterate.svg\n\n[downloads]: https://www.npmjs.com/package/array-iterate\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/array-iterate.svg\n\n[size]: https://bundlephobia.com/result?p=array-iterate\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[skypack]: https://www.skypack.dev\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[foreach]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n","_attachments":{},"homepage":"https://github.com/wooorm/array-iterate#readme","bugs":{"url":"https://github.com/wooorm/array-iterate/issues"},"license":"MIT"}