{"id":19097175,"url":"https://github.com/atmajs/alot","last_synced_at":"2026-03-17T18:05:02.876Z","repository":{"id":35594194,"uuid":"218517658","full_name":"atmajs/alot","owner":"atmajs","description":"Turns your arrays into lazy and async streams","archived":false,"fork":false,"pushed_at":"2025-03-06T15:12:58.000Z","size":1741,"stargazers_count":83,"open_issues_count":4,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-08T03:01:07.650Z","etag":null,"topics":["arrays","async","javascript","promise","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atmajs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-30T12:01:19.000Z","updated_at":"2025-08-20T18:49:05.000Z","dependencies_parsed_at":"2024-06-18T17:02:03.444Z","dependency_job_id":"d5bf42e8-c0b4-4eea-9b37-0d17c575f0ba","html_url":"https://github.com/atmajs/alot","commit_stats":{"total_commits":55,"total_committers":3,"mean_commits":"18.333333333333332","dds":0.509090909090909,"last_synced_commit":"668b15e8e3303080b97bff5817ec54887928ffa4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atmajs/alot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Falot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Falot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Falot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Falot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atmajs","download_url":"https://codeload.github.com/atmajs/alot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Falot/sbom","scorecard":{"id":214858,"data":{"date":"2025-08-11","repo":{"name":"github.com/atmajs/alot","commit":"6e93efd2a58c1e1ec87507b9841f6f551bd4a4eb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"43 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-p28h-cc7q-c4fg","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-rmxg-73gg-4p98","Warn: Project is vulnerable to: GHSA-6c3j-c64m-qhgq","Warn: Project is vulnerable to: GHSA-gxr4-xjj5-5px2","Warn: Project is vulnerable to: GHSA-jpcq-cgw6-v4j6","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-f9cm-p3w6-xvr3","Warn: Project is vulnerable to: GHSA-jjv7-qpx3-h62q","Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-v2p6-4mp7-3r9v","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T01:27:56.068Z","repository_id":35594194,"created_at":"2025-08-17T01:27:56.068Z","updated_at":"2025-08-17T01:27:56.068Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30628405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arrays","async","javascript","promise","typescript"],"created_at":"2024-11-09T03:39:17.247Z","updated_at":"2026-03-17T18:05:02.858Z","avatar_url":"https://github.com/atmajs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alot\n\n\u003cp align='center'\u003e\n    \u003cimg src='assets/background.png'/\u003e\n\u003c/p\u003e\n\n----\n\n[![Build Status](https://api.travis-ci.com/atmajs/alot.png?branch=master)](https://app.travis-ci.com/github/atmajs/alot)\n[![NPM version](https://badge.fury.io/js/alot.svg)](http://badge.fury.io/js/alot)\n![ts](https://badgen.net/badge/Built%20With/TypeScript/blue)\n\n**🌱 Lazy**, **⛓️ Async** and ⚡ Performance-Optimized `Array/Stream` methods\n\n\n```ts\n\nimport alot from 'alot';\n\nconst users: IUser[];\n\n// Sync\nconst userAgeGroups = alot(users)\n    .distinctBy(x =\u003e x.email)\n    .sortBy(x =\u003e x.createdAt)\n    .groupBy(x =\u003e x.age)\n    .skip(1)\n    .take(2)\n    .toArray();\n\n// Async\nconst userData = await alot(users)\n    .mapAsync(async user =\u003e UserService.loadFooMeta(user.id))\n    .toArrayAsync({ threads: 4 });\n\n```\n\n----\n- [📝 Blog Post 🔗](https://dev.kit.eco/alot-turns-your-arrays-into-lazy-and-async-streams)\n- [📚 API Documentation 🔗](https://docs.atma.dev/alot/classes/Alot.html)\n----\n\nMethods overview:\n\n### `map`, `mapAsync`\n\n```ts\nmap \u003cT, TResult\u003e (fn: (x: T, i?: number) =\u003e TResult): IAlotStream\u003cTResult\u003e\n```\n\n```ts\nmapAsync \u003cT, TResult\u003e (fn: (x: T, i?: number) =\u003e PromiseLike\u003cTResult\u003e): IAlotStream\u003cTResult\u003e\n```\n\n### `mapMany`, `mapManyAsync`\n\n```ts\nmap \u003cT, TResult\u003e (fn: (x: T, i?: number) =\u003e TResult[]): IAlotStream\u003cTResult\u003e\n```\n\n```ts\nmapAsync \u003cT, TResult\u003e (fn: (x: T, i?: number) =\u003e PromiseLike\u003cTResult[]\u003e): IAlotStream\u003cTResult\u003e\n```\n\n\n### `mapFull`, `mapFullAsync`\n\nTransform the complete stream\n\n```ts\nmapFull \u003cT, TResult\u003e (fn: (arr: T[]) =\u003e TResult): IAlotStream\u003cTResult\u003e\n```\n\n```ts\nmapFullAsync \u003cT, TResult\u003e (fn: (arr: T[]) =\u003e PromiseLike\u003cTResult[]\u003e): PromiseLike\u003cTResult\u003e\n```\n\n### `filter`, `filterAsync`\n\n```ts\nfilter \u003cT\u003e (fn: (x: T, i?: number) =\u003e boolean): IAlotStream\u003cT\u003e\n```\n\n```ts\nfilterAsync \u003cT\u003e (fn: (x: T, i?: number) =\u003e PromiseLike\u003cboolean\u003e): IAlotStream\u003cT\u003e\n```\n\n\n### `forEach`, `forEachAsync`\n```ts\nforEach \u003cT\u003e (fn: (x: T, i?: number) =\u003e void | any): IAlotStream\u003cT\u003e\n```\n```ts\nforEachAsync \u003cT\u003e (fn: (x: T, i?: number) =\u003e void | any): IAlotStream\u003cT\u003e\n```\n\n### `take`, `takeWhile`, `takeWhileAsync`\n\n```ts\ntake \u003cT\u003e (count: number): IAlotStream\u003cT\u003e\n```\n\n```ts\ntakeWhile \u003cT\u003e (fn: (x: T) =\u003e boolean): IAlotStream\u003cT\u003e\ntakeWhileAsync \u003cT\u003e (fn: (x: T) =\u003e boolean | Promise\u003cboolean\u003e): IAlotStream\u003cT\u003e\n```\n\n### `skip`, `skipWhile`, `skipWhileAsync`\n\n```ts\nskip \u003cT\u003e (count: number): IAlotStream\u003cT\u003e\n```\n\n```ts\nskipWhile \u003cT\u003e (fn: (x: T, i?: number) =\u003e boolean): IAlotStream\u003cT\u003e\nskipWhileAsync \u003cT\u003e (fn: (x: T, i?: number) =\u003e boolean | Promise\u003cboolean\u003e): IAlotStream\u003cT\u003e\n```\n\n\n### `groupBy`\n\n```ts\ngroupBy \u003cT, TKey = string \u003e (fn: (x: T) =\u003e TKey): IAlotStream\u003c { key: TKey[], values: T[] } \u003e\n```\n\n\n\n### `join`\n\n\u003e Join elements from collection `Inner` and collection `Outer` by the matched `Key`. Elements with **no** matches are **skipped**.\n\n```ts\n// Inner Left Join\njoin \u003cTOuter, TResult\u003e (\n    inner: TInner[],\n    getKeyOuter: (x: TOuter) =\u003e string | number,\n    getKeyInner: (x: TInner) =\u003e string | number,\n    joinFn: (a: TOuter, b: TInner) =\u003e TResult\n): IAlotStream\u003c TResult \u003e\n```\n\n### `joinOuter`\n\n\u003e Join elements from collection `Inner` and collection `Outer` by the matched `Key`. Elements with **no** matches are **included** as is.\n\n```ts\n// Outer Full Join\njoinOuter \u003cTOuter, TResult\u003e (\n    inner: TInner[],\n    getKey: (x: TOuter) =\u003e string | number,\n    getForeignKey: (x: TInner) =\u003e string | number,\n    joinFn: (a?: TOuter, b?: TInner) =\u003e TResult\n): IAlotStream\u003c TResult \u003e\n\n```\n\n\n### `concat`\n\n\u003e Same as `Array::concat`\n\n```ts\n// Outer Full Join\nconcat \u003cTSource\u003e (\n    other: TOther[],\n): IAlotStream\u003c (TSource | TOther) \u003e\n\n```\n\n### `distinctBy`\n\n```ts\ndistinctBy \u003cT, TKey = string\u003e (fn: (x: T, i?: number) =\u003e TKey): IAlotStream\u003cT\u003e\n```\n\n\n### `sortBy`, `sortByAsync`, `sortByLocalCompare`\n\n```ts\nsortBy \u003cT\u003e (fn: (x: T, i?: number) =\u003e string | number, direction: 'asc' | 'desc' = 'asc'): IAlotStream\u003cT\u003e\nsortBy \u003cT\u003e (property: string, direction: 'asc' | 'desc' = 'asc'): IAlotStream\u003cT\u003e\n// also nested path are supported 'user.foo.username'\n```\n\n### `thenBy`\n\n`thenBy()` specifies a secondary sort method that is used to further sort data that has already been sorted with a call to `sortBy()`\n\n```ts\nalot(arr).sortBy(x =\u003e x.age).thenBy(x =\u003e x.name).toArray()\n```\n\n# Output Data\n\n### `toArray`\n\n```ts\ntoArray(): T[]\n```\n\n### `toArrayAsync`\n\n```ts\ntoArrayAsync(options: {\n    threads?: number\n    errors?: 'reject' | 'include' | 'ignore'\n} = { threads: 4, errors: 'reject' }): Promise\u003cT[]\u003e\n```\n\n\u003e `errors` 'reject' - all iterations will be stopped and the task will reject.\n\u003e `errors` 'include' - all iterations will be executed, and any throw or rejection will be in resulted array.\n\u003e `errors` 'ignore' - all iterations will be executed, and any throw or rejection are ignored. The resulted array could contain holes.\n\n### `toDictionary` `toDictionaryAsync`\n\n```ts\ntoDictionary\u003cTKey = string | number, TOut = T\u003e(keyFn: (x: T) =\u003e TKey, valFn?: (x: T) =\u003e TOut ): { [key: string]: TOut }\ntoDictionaryAsync\u003cTKey = string | number, TOut = T\u003e(keyFn: (x: T) =\u003e TKey | Promise\u003cTKey\u003e, valFn?: (x: T) =\u003e TOut | Promise\u003cTOut\u003e ): Promise\u003c{ [key: string]: TOut }\u003e\n```\n\n### `toMap` `toMapAsync`\n\n```ts\ntoDictionary\u003cTKey = any, TOut = T\u003e(keyFn: (x: T) =\u003e TKey, valFn?: (x: T) =\u003e TOut ): Map\u003cTKey, TOut\u003e\ntoDictionaryAsync\u003cTKey = any, TOut = T\u003e(keyFn: (x: T) =\u003e TKey | Promise\u003cTKey\u003e, valFn?: (x: T) =\u003e TOut | Promise\u003cTOut\u003e ): Promise\u003cMap\u003cTKey, TOut\u003e\u003e\n```\n\n\n### `first`, `find` (alias), `firstAsync`, `findAsync`\n\n```ts\nfirst(matcher?: (x: T, i?: number) =\u003e boolean): T\nfind(matcher?: (x: T, i?: number) =\u003e boolean): T\n\nfirstAsync(matcher?: (x: T, i?: number) =\u003e boolean | Promise\u003cboolean\u003e): Promise\u003cT\u003e\nfind(matcher?: (x: T, i?: number) =\u003e boolean | Promise\u003cboolean\u003e): Promise\u003cT\u003e\n```\n\n# Aggregation\n\n### `sum`, `sumAsync`, `sumBigInt`, `sumBigIntAsync`\n\n```ts\nsum      (fn: (x: T, i?: number) =\u003e number): number\nsumAsync (fn: (x: T, i?: number) =\u003e number | Promise\u003cnumber\u003e): Promise\u003cnumber\u003e\n```\n\n### `max`, `maxAsync`, `min`, `minAsync`\n\n```ts\nmax \u003cTNumeric\u003e (getVal: (x: T, i?: number) =\u003e TNumeric): TNumeric\nmaxAsync \u003cTNumeric\u003e (getVal: (x: T, i?: number) =\u003e TNumeric): Promise\u003cTNumeric\u003e\n\nmin \u003cTNumeric\u003e (getVal: (x: T, i?: number) =\u003e TOut): TNumeric\nminAsync \u003cTNumeric\u003e (getVal: (x: T, i?: number) =\u003e TOut): Promise\u003cTNumeric\u003e\n\n```\n\n\n# Static Methods\n\n\n#### `fromObject`\n\n```ts\nalot.fromObject(foo: any): Alot\u003c{ key: string, value: string }\u003e\n```\n\n\n#### `fromRange`\n\n```ts\nalot.fromRange(start: number, endExcluded: number): Alot\u003cnumber\u003e\n```\n\nSupports ascending, e.g.`[-1..10)`, and descending ranges - `[10..-1)`\n\n----\n_Atma.js Project_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatmajs%2Falot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatmajs%2Falot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatmajs%2Falot/lists"}