{"_id":"@_rj_/array-extensions","_rev":"2-ca7948628820fd35fe666f0193bef599","name":"@_rj_/array-extensions","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"version":"1.0.0","name":"@_rj_/array-extensions","description":"A set of javascript array extensions/helpers","author":{"name":"RJ Tuit"},"type":"module","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"https://github.com/RobertjanTuit/array-extensions"},"keywords":["typescript","javascript","array","extensions","helpers"],"scripts":{"build":"tsc","build-test":"yarn build && yarn test","build-watch-test":"npx tsc-watch --onSuccess \"yarn test\"","clean":"rimraf dist && rimraf node_modules/.cache","clean-build":"npx clean && npx build","clean-build-test":"yarn clean && yarn build && yarn test","clean-build-watch-test":"yarn clean && yarn build-watch-test","tsindex":"ts-index-generator src --ignore **/*.test.ts","test":"ava","lint":"eslint src/**/* *.json --fix","release-prep":"yarn lint && yarn clean-build-test","release":"np"},"publishConfig":{"access":"public"},"ava":{"nodeArguments":["--experimental-modules","--es-module-specifier-resolution=node"]},"devDependencies":{"@_rj_/ts-index-generator":"^1.0.0-beta.4","@typescript-eslint/eslint-plugin":"^5.10.1","@typescript-eslint/parser":"^5.10.1","ava":"^4.0.1","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.4","eslint-plugin-json":"^3.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^5.2.0","np":"^7.6.0","prettier":"^2.5.1","rimraf":"^3.0.2","tsc-watch":"^4.6.0","typescript":"^4.5.5"},"licenseText":"MIT License\n\nCopyright (c) 2022 RJ Tuit\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@_rj_/array-extensions@1.0.0","dist":{"shasum":"cb7623815babbb9e1b48bc6320e32f87e4ef7629","integrity":"sha512-uaezthTo7jC+gpuboGEn8Hd+PMig3EQ/tGADZPeHaKjGy11X+Vo//Kcy2K0BVm2yikQvxA01xV00V4tg5Q0agA==","tarball":"https://registry.npmjs.org/@_rj_/array-extensions/-/array-extensions-1.0.0.tgz","fileCount":99,"unpackedSize":38872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh94cWCRA9TVsSAnZWagAAxa0P/1CN/YnkK9PkjUVTnrkM\njxw3IY6/LeJcZbGT//kgbVw99rQBjMWSYeDnwkPx9K+EwyaPlD8zq2BlYMUD\n5KFR1CDtX7w2IUlg+Vb8EIy5J1Jy+E6e5oWkaLWOdD1fJGtUCrea2X3ogPdi\nDeoc62PC8w7k6VpdINpXgYllhYon9Wqf0PYRRLQuBbZmrTcPbOVqF3Dmm0Yj\nADvpot3GiLPb+KQBo2+HNwJDR5s9M8dyDHbIj2Ii8HqV3WVl2MPnz1xxRdhI\nZSFVaM4nAcDWcVuQVuWhz7enzDYIRv74HWtNzkRuZ+IGjv2QJ8LpGnMDflVe\nHx0svo0m7vD0i+gWhG9ALPSo0iOPOsm7A7jJzJKGdQqFKCOCyrYh5XK3/X2Y\nVwGRV1KoLT25+hceGG4t2Pf/daUg3skZIWH/6TtONJnm7KXThCem8KBdxsr3\nLFnXIZiTAYLP7OSVvNmkHP0/v1wGsRWim30Cbnwi2f9eRfrnKEclJjr2IGsc\ngifpKsSOMqgQyGFj8SwNgfpXzaEokzHYcrbrLqeYLF61fR2UWLFvo2PJZbBP\nHs56MbtRYM+ZtMuQHTQmDEMhRmzDfd8f/MxnbKERGwEB3C3g0w3CtjZfR3xA\n0ikn6XKIiUIEPSTMFWb57H2/xscJR+pxGzDF+p7OytMDbUsB6La3sLljRjRt\nQzpD\r\n=h5Xl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEPx8aawaRiKaIHIscXDikaVuanTKR2fkAFz9yKgLJz2AiBkUt2Xl98T9kuQ1XESc/eYHpCRB2p/J7vJhNstFZ5mog=="}]},"_npmUser":{"name":"_rj","email":"rtuit@microsoft.com"},"directories":{},"maintainers":[{"name":"_rj","email":"rtuit@microsoft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-extensions_1.0.0_1643611926051_0.4794089500698402"},"_hasShrinkwrap":false},"1.0.1":{"version":"1.0.1","name":"@_rj_/array-extensions","description":"A set of javascript array extensions/helpers","author":{"name":"RJ Tuit"},"type":"module","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"https://github.com/RobertjanTuit/array-extensions"},"keywords":["typescript","javascript","array","extensions","helpers"],"scripts":{"build":"tsc","build-test":"yarn build && yarn test","build-watch-test":"npx tsc-watch --onSuccess \"yarn test\"","clean":"rimraf dist && rimraf node_modules/.cache","clean-build":"npx clean && npx build","clean-build-test":"yarn clean && yarn build && yarn test","clean-build-watch-test":"yarn clean && yarn build-watch-test","tsindex":"ts-index-generator src --ignore **/*.test.ts","test":"ava","lint":"eslint src/**/* *.json --fix","release-prep":"yarn lint && yarn clean-build-test","release":"np --no-2fa"},"publishConfig":{"access":"public"},"ava":{"nodeArguments":["--experimental-modules","--es-module-specifier-resolution=node"]},"devDependencies":{"@_rj_/ts-index-generator":"^1.0.0-beta.4","@typescript-eslint/eslint-plugin":"^5.10.1","@typescript-eslint/parser":"^5.10.1","ava":"^4.0.1","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.25.4","eslint-plugin-json":"^3.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^5.2.0","np":"^7.6.0","prettier":"^2.5.1","rimraf":"^3.0.2","tsc-watch":"^4.6.0","typescript":"^4.5.5"},"licenseText":"MIT License\n\nCopyright (c) 2022 RJ Tuit\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@_rj_/array-extensions@1.0.1","dist":{"shasum":"02e55e9a3ba2b9011b6dfb07252fa0a30c971efc","integrity":"sha512-Jtmum9Dmqe1FFD+aovKmHjb6PV93v9W+tYAyaxXBMbsgo1RX7XXPpyplQz1p8R1eAW3qgOzUWlBdtKLAnR0YqQ==","tarball":"https://registry.npmjs.org/@_rj_/array-extensions/-/array-extensions-1.0.1.tgz","fileCount":99,"unpackedSize":38881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh94epCRA9TVsSAnZWagAAkbwQAIt8W/Jk7AlRb3fcVgWu\nr5tUPXwWacZDHuVCHA9GglHGaFvlP+e6ANq2JO4xe49Nkg9kmMVSnovfcbNr\nXeA1MntEEqOI/S+WjqaT/GEZVL9NkcpcOxM2F7kYHln0XYJvUnOxXZ5iFmEm\nyoi+xMVlY/KGYg9bBkoWgIs5VK3h5BWQ7ak4gqgeLaspPoGvtTYZCksw/pA1\nkJNk5H1GuHmp8CBfTvw6VRecKBt/7oUa2DWifo6kMXNaWkw6Jl0lzqF+JPtk\nhw8Ztq8xcfN6imzavWZazXQj4DdGJTQ+J9Kif6Ve5a21fsNa+2xHqmN5DO7N\nSOQOKapciRbVKvEtxdPFKtFpWcu1J4D1EseE090DEh78nAh1LhRRzBRBrS50\ndg1VEWHCq9sldXLiW2zmr55NRvDfO8p+uB8TOBeM9zX2O9roIiaHA6s+XkmR\n2eC/3s+mFsSfyNF0ArjLI9P0hr/uigUcyt3KlaFnBgEGTMdxFJ8fYJxyQyyF\nmZancQKim8jMSArnWy/86j3fUg7led+PUWMd5R06PypD8KJU4NZ0FrxvXZO1\nDgmxC1zU0TGlKsyZiowadFp+4b/sXbkSfek7C1QL+SRusPgYGgk7Syl3IVKj\nG8TAMw/13jP6BTlbKmU0lFrU2swBuy+oGo7lbXXp3NuAUTaVVxyLEc6wA71d\n+F7o\r\n=N+NY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwF8z8z2PPks+10tmonXU38osIj5AvGzhct6DMM12p5AiEA4Sj2nJ/jacyDupq/vH6RbXRdzONuoh2irlegnudfLYg="}]},"_npmUser":{"name":"_rj","email":"rtuit@microsoft.com"},"directories":{},"maintainers":[{"name":"_rj","email":"rtuit@microsoft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-extensions_1.0.1_1643612073522_0.8467002368884071"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-31T06:52:05.996Z","1.0.0":"2022-01-31T06:52:06.248Z","modified":"2022-04-04T10:51:41.053Z","1.0.1":"2022-01-31T06:54:33.720Z"},"maintainers":[{"name":"_rj","email":"rtuit@microsoft.com"}],"description":"A set of javascript array extensions/helpers","keywords":["typescript","javascript","array","extensions","helpers"],"repository":{"type":"git","url":"https://github.com/RobertjanTuit/array-extensions"},"author":{"name":"RJ Tuit"},"license":"MIT","readme":"# array-extensions\n\nA set of extensions to the array object to make dealing with them easier, neither unique or new, and with lots of inspiration from other languages, stackoverflow and other github projects :)\n\nIncludes TypeScript definition files.\n\n## Usage: \n(Also see tests for more usage patterns)\n\n```javascript\nimport \"array-extensions\";\n\n// async/await\nawait [1,2,3].forEachAsync(async (item) => {\n    // do something await/async with {item}\n})\n\n// then/cath/finally\n[4,5,6].forEachAsync(async (item) => {\n    // do something async with {item}\n}).then(() => {\n    // execute something when done \n})\n```\n## Available functions\n```typescript\n// proper sequential forEach on async functions\nArray<T>.forEachAsync(async callback): Promise<void>\n```\n\n```typescript\n//Concurrent async forEach, with threadCount\nArray<T>.forEachAsyncConcurrent(async callback: (item: T) => void, threadCount = 4, continueOnError = true): Promise<void>\n```\n\n```typescript\n// proper sequential map on async functions\nArray<T>.mapAsync<TT>(async callback: (item: T) => TT): Promise<TT>\n```\n\n```typescript\n// Concurrent async map, with threadCount\nArray<T>.mapAsyncConcurrent<TT>(async callback: (item: T) => TT, threadCount = 4, continueOnError = true): Promise<TT>\n```\n\n```typescript\n// simple reduce groupby, \nArray<T>.groupBy(propName: string)\nArray<T>.groupBy(callback: (item: T) => string)\n```\n\n```typescript\n// Following function should say it all, will add more over time (Only works on number arrays)\nArray<T>.max(callback: (item: T): number): number\nArray<T>.min(callback: (item: T): number): number\nArray<T>.sum(callback: (item: T): number): number\n```\n","readmeFilename":"README.md"}