Skip to content

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.

License

Notifications You must be signed in to change notification settings

rimbu-org/rimbu

Repository files navigation

npm version Deno Licence codecov

Rimbu: Immutable Collections and Tools for TypeScript

Welcome to Rimbu—your go-to TypeScript library for highly performant, type-safe, and immutable collections. With Rimbu, your data manipulation tasks become more efficient and predictable, offering enhanced data integrity and type safety.

Why Choose Rimbu?

  • Data Integrity: Prevent accidental modifications and safeguard your original data.
  • Debugging Made Easy: Simplify reasoning about your code and catch bugs early.
  • Type Safety: Full compatibility with TypeScript ensures robust code.
  • Performance Boost: Reduce the need for deep copies.
  • Functional Programming: Supports immutability-based change detection, undo/redo features, and safe concurrent programming.
  • Simplified Testing: Eliminate side effects and simplify your tests.
  • Versatile: Works seamlessly across Web, Node.js, Bun, and Deno environments.

Quick Links

Installation

Compatibility

Package Managers

Yarn:

yarn add @rimbu/core

npm:

npm install @rimbu/core

Bun:

bun add @rimbu/core

Deno Setup

Create or edit import_map.json in your project root:

{
  "imports": {
    "@rimbu/": "https://deno.land/x/rimbu@x.y.z/"
  }
}

Replace x.y.z with the desired version.

Main Packages

Package Description
@rimbu/bimap Bidirectional map with one-to-one key-value mapping
@rimbu/bimultimap Bidirectional multimap with many-to-many key-value mapping
@rimbu/collection-types Generic collection types definitions
@rimbu/common Common types and functions across the library
@rimbu/core Exports most main types from other packages
@rimbu/deep Tools for treating JS objects as immutable
@rimbu/graph Graph implementations with nodes and edges
@rimbu/hashed HashMap and HashSet implementations
@rimbu/list Efficiently ordered sequence manipulations
@rimbu/multimap Map with one-to-many key-value mapping
@rimbu/multiset Set allowing multiple occurrences of elements
@rimbu/ordered OrderedSet and OrderedMap collections
@rimbu/sorted SortedMap and SortedSet with efficient sorting
@rimbu/stream Data sequence manipulation methods
@rimbu/table Table structures with row and column key mapping

Development Setup

  1. Clone the repository.
  2. Run yarn to install dependencies.
  3. To build packages, use yarn build.
  4. Run tests with yarn test.

Author

Created and maintained by Arvid Nicolaas.

Contributing

We welcome contributions! Please read our Contributing guide.

Contributors

Made with contributors-img.

Acknowledgements

Special thanks to bglgwyng for being the first Rimbu sponsor. You're awesome!

License

This project is licensed under the MIT License. See the LICENSE for details.