{"id":26550142,"url":"https://github.com/swingcosmic/array-proto-ext","last_synced_at":"2026-05-11T02:04:48.856Z","repository":{"id":44118381,"uuid":"194285423","full_name":"SwingCosmic/array-proto-ext","owner":"SwingCosmic","description":"A functional extension directly adds to Array.prototype","archived":false,"fork":false,"pushed_at":"2023-01-04T01:38:27.000Z","size":424,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-26T03:09:57.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwingCosmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-28T14:16:53.000Z","updated_at":"2019-08-01T06:02:25.000Z","dependencies_parsed_at":"2023-02-01T17:31:22.429Z","dependency_job_id":null,"html_url":"https://github.com/SwingCosmic/array-proto-ext","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwingCosmic%2Farray-proto-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwingCosmic%2Farray-proto-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwingCosmic%2Farray-proto-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwingCosmic%2Farray-proto-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwingCosmic","download_url":"https://codeload.github.com/SwingCosmic/array-proto-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924672,"owners_count":20532872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-22T07:30:28.366Z","updated_at":"2026-05-11T02:04:43.812Z","avatar_url":"https://github.com/SwingCosmic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# array-proto-ext\nA functional extension directly adds to Array.prototype\n\n * WARNING: Importing this module would modify some properties of `Array.prototype` . Ensure that you know all side effects before import. \n\n----\n## features\n\n* Strong type definition\n\n  Fully written by TypeScript.\n* Webpack support\n\n  You can use it in any Webpack project like Vue CLI.\n* High performance\n\n  * Some functions use the the implementations of `Lodash` .\n  * Use ES2015 generator function and `for ... of ...` expression(target to ES6) to decrease the useless `for` loop.\n* Import just **ONCE** in the entry point\n  \n  Directly add functions to Array.prototype\n* Conditional version of query functions, like `countIf`, `sumBy`, etc.\n* Unit test support\n  \n----\n## example\n\n```javascript\nimport \"array-proto-ext\";\n\nlet arr = Array.prototype.range(2, 10);\n// arr = [2, 3, 4, 5, 6, 7, 8, 9, 10]\nlet evenCount = arr.countIf(x =\u003e x % 2 === 0);\n// evenCount = 5\nlet items = [\n    { id: \"100001\", itemId: 1, name: \"item A\" },\n    { id: \"100002\", itemId: 2, name: \"item B\" },\n    { id: \"100003\", itemId: 1, name: \"another item A\"},\n];\nlet ownedIds = items.distinct(x =\u003e x.itemId)\n                    .map(x =\u003e x.itemId);\n// ownedIds = [1, 2]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswingcosmic%2Farray-proto-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswingcosmic%2Farray-proto-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswingcosmic%2Farray-proto-ext/lists"}