{"id":13452526,"url":"https://github.com/frptools/collectable","last_synced_at":"2025-04-09T05:10:43.543Z","repository":{"id":12497019,"uuid":"71999171","full_name":"frptools/collectable","owner":"frptools","description":"High-performance immutable data structures for modern JavaScript and TypeScript applications. Functional interfaces, deep/composite operations API, mixed mutability API, TypeScript definitions, ES2015 module exports.","archived":false,"fork":false,"pushed_at":"2023-03-06T05:28:35.000Z","size":3053,"stargazers_count":273,"open_issues_count":39,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T23:33:51.523Z","etag":null,"topics":["batching","data-structures","deep","dictionary","es2015-modules","hash-array-mapped-trie","immutable","immutablejs","javascript","javascript-library","list","map","nested-structures","red-black-tree","set","sorted-map","sorted-set","typescript","typescript-definitions"],"latest_commit_sha":null,"homepage":"","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/frptools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-26T12:06:45.000Z","updated_at":"2025-03-27T15:52:14.000Z","dependencies_parsed_at":"2024-01-02T23:42:38.104Z","dependency_job_id":"9e121fc5-409b-434b-a565-9642d23a0de7","html_url":"https://github.com/frptools/collectable","commit_stats":{"total_commits":250,"total_committers":9,"mean_commits":27.77777777777778,"dds":"0.052000000000000046","last_synced_commit":"c27564def1b4eabc7ad4df0cc47f9463e16fdaab"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frptools%2Fcollectable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frptools%2Fcollectable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frptools%2Fcollectable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frptools%2Fcollectable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frptools","download_url":"https://codeload.github.com/frptools/collectable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247698331,"owners_count":20981336,"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":["batching","data-structures","deep","dictionary","es2015-modules","hash-array-mapped-trie","immutable","immutablejs","javascript","javascript-library","list","map","nested-structures","red-black-tree","set","sorted-map","sorted-set","typescript","typescript-definitions"],"created_at":"2024-07-31T07:01:26.593Z","updated_at":"2025-04-09T05:10:43.526Z","avatar_url":"https://github.com/frptools.png","language":"TypeScript","readme":"# [![Collectable.js: Immutable Data Structures](https://github.com/frptools/collectable/raw/master/.assets/logo.png)](https://github.com/frptools/collectable)\n\nAn all-you-can-eat buffet of high-performance, [persistent](https://en.wikipedia.org/wiki/Persistent_data_structure), [immutable](https://en.wikipedia.org/wiki/Immutable_object), [functional](https://en.wikipedia.org/wiki/Functional_programming) data structures. Collect them all!\n\n[![Build Status](https://travis-ci.org/frptools/collectable.svg?branch=master)](https://travis-ci.org/frptools/collectable)\n[![NPM version](https://badge.fury.io/js/collectable.svg)](http://badge.fury.io/js/collectable)\n[![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/FRPTools/Lobby)\n\n\u003e _Note: This library is an ongoing **work in progress**. The data structures mentioned below are all working nicely, but will probably have additional methods introduced as time goes on, and there may be some breaking changes in future versions when work commences to iron out API inconsistencies between data structures. Documentation is also somewhat lacking and out of date, but take a look at the `functions` folder for each data structure package, which is almost as good as actual documentation, due to the one-operation-per-file policy, and the comprehensive TypeScript annotations._\n\n## Features\n\n- [x] A robust suite of **high-performance data structures** for most use cases\n- [x] Full **ES2015 module support** so that your application bundle only need grow in size according to what you actually use\n- [x] **Functional API**, prioritising an order of parameters best suited for currying and composition\n- [ ] :construction: API for **deep operations** on **nested structures**\n- [x] Deep and shallow **conversion to and from native types**, including arrays, objects, iterables, Maps and Sets\n- [x] Complete set of **TypeScript definitions**\n- [ ] Extensive **documentation** and **examples**\n- [x] **One package import** to access everything, **or isolated npm packages** for each individual data structure\n- [x] Comprehensive unit test suite, consisting of hundreds of tests for every data structure\n- [x] Strong focus on a code style that **emphasises high performance** internally\n\n## Data Structures\n\n- [ **[List](/packages/list#collectablejs-immutable-list)** ] A persistent [list/vector](https://en.wikipedia.org/wiki/List_(abstract_data_type)) structure based on a modified [RRB Tree](https://infoscience.epfl.ch/record/169879/files/RMTrees.pdf) implementation.\n- [ **[Map](/packages/map#collectablejs-immutable-map)** ] A persistent [hash map](https://en.wikipedia.org/wiki/Associative_array), mapping keys to values. Implemented as a Clojure-style [hash array mapped trie](https://en.wikipedia.org/wiki/Hash_array_mapped_trie).\n- [ **[Sorted Map](/packages/sorted-map#collectablejs-immutable-sorted-map)** ] A persistent sorted [map](https://en.wikipedia.org/wiki/Associative_array) backed by a [red-black tree](/packages/red-black-tree#collectablejs-immutable-sorted-set) and a [hash map](/packages/map#collectablejs-immutable-map) with user-definable sort order.\n- [ **[Set](/packages/set#collectablejs-immutable-set)** ] A persistent [set](https://en.wikipedia.org/wiki/Set_(abstract_data_type)), backed by a [hash map](/packages/map#collectablejs-immutable-map).\n- [ **[Sorted Set](/packages/sorted-set#collectablejs-immutable-sorted-set)** ] A persistent sorted [set](https://en.wikipedia.org/wiki/Set_(abstract_data_type)) backed by a [red-black tree](/packages/red-black-tree#collectablejs-immutable-red-black-tree) and a [hash map](https://en.wikipedia.org/wiki/Associative_array), with user-definable sort order.\n- [ **[Red Black Tree](/packages/red-black-tree#collectablejs-immutable-red-black-tree)** ] A persistent [red-black tree](https://en.wikipedia.org/wiki/Red%E2%80%93black_tree), providing a balanced binary search tree which maps keys to values.\n\nSee the [road map](https://github.com/frptools/collectable/wiki) for information on further development and plans for additional features and data structures.\n\n## Installation\n\n```bash\n# via NPM\nnpm install collectable\n\n# or Yarn\nyarn add collectable\n```\n\nTypeScript type definitions are built in.\n\n## Usage\n\n**API Reference:**\n[ [General](/packages/collectable#collectablejs-main-package)\n| [List](/packages/list#collectablejs-immutable-list)\n| [Map](/packages/map#collectablejs-immutable-map)\n| [Sorted Map](/packages/sorted-map#collectablejs-immutable-sorted-map)\n| [Set](/packages/set#collectablejs-immutable-set)\n| [Sorted Set](/packages/sorted-set#collectablejs-immutable-sorted-set)\n| [Red Black Tree](/packages/red-black-tree#collectablejs-immutable-red-black-tree)\n| [Others...](https://github.com/frptools/collectable/wiki) ]\n\n## Contributor Credits (Deliberate or Unwitting)\n\n- Map implementation adapted from [Tylor Steinberger](https://github.com/TylorS)'s [TypeScript conversion](https://github.com/TylorS/typed-hashmap) of [Matt Bierner's HAMT](https://github.com/mattbierner/hamt_plus) implementation.\n\nWant to help out? See [the guide for contributors](CONTRIBUTING.md).\n","funding_links":[],"categories":["Libraries","TypeScript"],"sub_categories":["Data Structures"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrptools%2Fcollectable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrptools%2Fcollectable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrptools%2Fcollectable/lists"}