Skip to content

Commit

Permalink
Merge pull request #239 from rimbu-org/feature/generic-updates
Browse files Browse the repository at this point in the history
Feature/generic updates
  • Loading branch information
vitoke authored Nov 8, 2024
2 parents 4152e62 + d5f6e13 commit 19ace35
Show file tree
Hide file tree
Showing 47 changed files with 1,604 additions and 1,300 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<img src="https://github.com/rimbu-org/rimbu/raw/main/assets/rimbu_logo.svg" />
</p>

[![npm version](https://badge.fury.io/js/@rimbu%2Fcore.svg)](https://www.npmjs.com/package/@rimbu/core) [![Deno](https://shield.deno.dev/x/rimbu)](http://deno.land/x/rimbu)
![Licence](https://img.shields.io/github/license/rimbu-org/rimbu) [![codecov](https://codecov.io/gh/rimbu-org/rimbu/branch/main/graph/badge.svg?token=RSFK5B0N0Z)](https://codecov.io/gh/rimbu-org/rimbu)
[![npm version](https://badge.fury.io/js/@rimbu%2Fcore.svg)](https://www.npmjs.com/package/@rimbu/core)
[![Deno](https://shield.deno.dev/x/rimbu)](http://deno.land/x/rimbu)
![Licence](https://img.shields.io/github/license/rimbu-org/rimbu)
[![codecov](https://codecov.io/gh/rimbu-org/rimbu/branch/main/graph/badge.svg?token=RSFK5B0N0Z)](https://codecov.io/gh/rimbu-org/rimbu)

# Rimbu: Immutable Collections and Tools for TypeScript

Expand Down
6 changes: 4 additions & 2 deletions deno_dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<img src="https://github.com/rimbu-org/rimbu/raw/main/assets/rimbu_logo.svg" />
</p>

[![npm version](https://badge.fury.io/js/@rimbu%2Fcore.svg)](https://www.npmjs.com/package/@rimbu/core) [![Deno](https://shield.deno.dev/x/rimbu)](http://deno.land/x/rimbu)
![Licence](https://img.shields.io/github/license/rimbu-org/rimbu) [![codecov](https://codecov.io/gh/rimbu-org/rimbu/branch/main/graph/badge.svg?token=RSFK5B0N0Z)](https://codecov.io/gh/rimbu-org/rimbu)
[![npm version](https://badge.fury.io/js/@rimbu%2Fcore.svg)](https://www.npmjs.com/package/@rimbu/core)
[![Deno](https://shield.deno.dev/x/rimbu)](http://deno.land/x/rimbu)
![Licence](https://img.shields.io/github/license/rimbu-org/rimbu)
[![codecov](https://codecov.io/gh/rimbu-org/rimbu/branch/main/graph/badge.svg?token=RSFK5B0N0Z)](https://codecov.io/gh/rimbu-org/rimbu)

# Rimbu: Immutable Collections and Tools for TypeScript

Expand Down
42 changes: 22 additions & 20 deletions deno_dist/actor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,34 @@ For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_ or

### Compabitity

- [`Node >= 16` ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?logo=node.js&logoColor=white)](https://nodejs.org)
- [`Node` ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?logo=node.js&logoColor=white)](https://nodejs.org)
- [`Deno` ![Deno JS](https://img.shields.io/badge/deno%20js-000000?logo=deno&logoColor=white)](https://deno.com/runtime)
- [`Bun >= 0.6.0` ![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logoColor=white)](https://bun.sh/)
- [`Bun` ![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logoColor=white)](https://bun.sh/)
- `Web` ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?logoColor=white)

### Yarn / NPM / Bun
### Package Managers

For `yarn`:
**Yarn:**

> `yarn add @rimbu/actor`
For `npm`:
```sh
yarn add @rimbu/actor
```

> `npm i @rimbu/actor`
**npm:**

For `bun`:
```sh
npm install @rimbu/actor
```

> `bun add @rimbu/actor`
**Bun:**

### Deno
```sh
bun add @rimbu/actor
```

For Deno, the following approach is recommended:
### Deno Setup

In the root folder of your project, create or edit a file called `import_map.json` with the following contents (where you should replace `x.y.z` with the desired version of Rimbu):
Create or edit `import_map.json` in your project root:

```json
{
Expand All @@ -51,7 +55,7 @@ In the root folder of your project, create or edit a file called `import_map.jso
}
```

**Note: The trailing slashes are important!**
_Replace `x.y.z` with the desired version._

In this way you can use relative imports from Rimbu in your code, like so:

Expand Down Expand Up @@ -97,20 +101,18 @@ console.log(actor.state)

## Author

[Arvid Nicolaas](https://github.com/vitoke)
Created and maintained by [Arvid Nicolaas](https://github.com/vitoke).

## Contributing

Feel very welcome to contribute to further improve Rimbu. Please read our [Contributing guide](https://github.com/rimbu-org/rimbu/blob/main/CONTRIBUTING.md).
We welcome contributions! Please read our [Contributing guide](https://github.com/rimbu-org/rimbu/blob/main/CONTRIBUTING.md).

## Contributors

<img src = "https://contrib.rocks/image?repo=rimbu-org/rimbu"/>

Made with [contributors-img](https://contrib.rocks).
_Made with [contributors-img](https://contrib.rocks)._

## License

Licensed under the MIT License, Copyright © 2020-present Arvid Nicolaas.

See [LICENSE](./LICENSE) for more information.
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) for details.
42 changes: 22 additions & 20 deletions deno_dist/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,34 @@ For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_ or

### Compabitity

- [`Node >= 16` ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?logo=node.js&logoColor=white)](https://nodejs.org)
- [`Node` ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?logo=node.js&logoColor=white)](https://nodejs.org)
- [`Deno` ![Deno JS](https://img.shields.io/badge/deno%20js-000000?logo=deno&logoColor=white)](https://deno.com/runtime)
- [`Bun >= 0.6.0` ![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logoColor=white)](https://bun.sh/)
- [`Bun` ![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logoColor=white)](https://bun.sh/)
- `Web` ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?logoColor=white)

### Yarn / NPM / Bun
### Package Managers

For `yarn`:
**Yarn:**

> `yarn add @rimbu/base`
For `npm`:
```sh
yarn add @rimbu/base
```

> `npm i @rimbu/base`
**npm:**

For `bun`:
```sh
npm install @rimbu/base
```

> `bun add @rimbu/base`
**Bun:**

### Deno
```sh
bun add @rimbu/base
```

For Deno, the following approach is recommended:
### Deno Setup

In the root folder of your project, create or edit a file called `import_map.json` with the following contents (where you should replace `x.y.z` with the desired version of Rimbu):
Create or edit `import_map.json` in your project root:

```json
{
Expand All @@ -51,7 +55,7 @@ In the root folder of your project, create or edit a file called `import_map.jso
}
```

**Note: The trailing slashes are important!**
_Replace `x.y.z` with the desired version._

In this way you can use relative imports from Rimbu in your code, like so:

Expand Down Expand Up @@ -85,20 +89,18 @@ console.log(arr);

## Author

[Arvid Nicolaas](https://github.com/vitoke)
Created and maintained by [Arvid Nicolaas](https://github.com/vitoke).

## Contributing

Feel very welcome to contribute to further improve Rimbu. Please read our [Contributing guide](https://github.com/rimbu-org/rimbu/blob/main/CONTRIBUTING.md).
We welcome contributions! Please read our [Contributing guide](https://github.com/rimbu-org/rimbu/blob/main/CONTRIBUTING.md).

## Contributors

<img src = "https://contrib.rocks/image?repo=rimbu-org/rimbu"/>

Made with [contributors-img](https://contrib.rocks).
_Made with [contributors-img](https://contrib.rocks)._

## License

Licensed under the MIT License, Copyright © 2020-present Arvid Nicolaas.

See [LICENSE](./LICENSE) for more information.
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) for details.
73 changes: 40 additions & 33 deletions deno_dist/bimap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,61 @@

# @rimbu/bimap

A BiMap is a bidirectional Map of keys and values, where each key has exactly one value, and each value has exactly one key. There is a one-to-one mapping between keys and values.
Welcome to `@rimbu/bimap`! A BiMap is a powerful bidirectional map that ensures a one-to-one mapping between keys and values. Each key is associated with exactly one value, and each value is associated with exactly one key.

This package exports the following types:
### Key Features:

| Name | Description |
| ------------------- | ---------------------------------------------------------------------------------------------- |
| `BiMap<K, V>` | a generic BiMap between keys of type K and values of type V |
| `HashBiMap<K, V>` | a BiMap between keys of type K and values of type V, where both the keys and values are hashed |
| `SortedBiMap<K, V>` | a BiMap between keys of type K and values of type V, where both the keys and values are sorted |
- **Bidirectional Mapping**: Effortlessly navigate between keys and values.
- **Unique Associations**: Guarantees unique key-value pairs, ensuring data integrity.

For complete documentation please visit the [BiMap page](https://rimbu.org/docs/collections/bimap) in the _[Rimbu Docs](https://rimbu.org)_, or directly see the _[Rimbu BiMap API Docs](https://rimbu.org/api/rimbu/bimap)_.
### Exported Types:

Or [Try Out Rimbu](https://codesandbox.io/s/github/vitoke/rimbu-sandbox/tree/main?previewwindow=console&view=split&editorsize=65&moduleview=1&module=/src/index.ts) in CodeSandBox.
| Name | Description |
| ------------------- | --------------------------------------------------------------------------------------- |
| `BiMap<K, V>` | A generic BiMap for keys of type `K` and values of type `V`. |
| `HashBiMap<K, V>` | A BiMap where both keys and values are hashed for efficient lookups. |
| `SortedBiMap<K, V>` | A BiMap where both keys and values are sorted, providing ordered traversal and lookups. |

### Documentation

For complete documentation, please visit the [BiMap page](https://rimbu.org/docs/collections/bimap) in the [Rimbu Docs](https://rimbu.org), or directly explore the [Rimbu BiMap API Docs](https://rimbu.org/api/rimbu/bimap).

### Try It Out

Experience `@rimbu/bimap` in action! [Try Out Rimbu](https://codesandbox.io/s/github/vitoke/rimbu-sandbox/tree/main?previewwindow=console&view=split&editorsize=65&moduleview=1&module=/src/index.ts) on CodeSandBox.

## Installation

### Compabitity

- [`Node >= 16` ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?logo=node.js&logoColor=white)](https://nodejs.org)
- [`Node` ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?logo=node.js&logoColor=white)](https://nodejs.org)
- [`Deno` ![Deno JS](https://img.shields.io/badge/deno%20js-000000?logo=deno&logoColor=white)](https://deno.com/runtime)
- [`Bun >= 0.6.0` ![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logoColor=white)](https://bun.sh/)
- [`Bun` ![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logoColor=white)](https://bun.sh/)
- `Web` ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?logoColor=white)

### Yarn / NPM / Bun

For convenience, all main types are also exported through [`@rimbu/core`](../core).

To install this package only:
### Package Managers

For `yarn`:
**Yarn:**

> `yarn add @rimbu/bimap`
For `npm`:
```sh
yarn add @rimbu/bimap
```

> `npm i @rimbu/bimap`
**npm:**

For `bun`:
```sh
npm install @rimbu/bimap
```

> `bun add @rimbu/bimap`
**Bun:**

### Deno
```sh
bun add @rimbu/bimap
```

For Deno, the following approach is recommended:
### Deno Setup

In the root folder of your project, create or edit a file called `import_map.json` with the following contents (where you should replace `x.y.z` with the desired version of Rimbu):
Create or edit `import_map.json` in your project root:

```json
{
Expand All @@ -63,7 +72,7 @@ In the root folder of your project, create or edit a file called `import_map.jso
}
```

**Note: The trailing slashes are important!**
_Replace `x.y.z` with the desired version._

In this way you can use relative imports from Rimbu in your code, like so:

Expand Down Expand Up @@ -94,20 +103,18 @@ console.log(biMap.toString());

## Author

[Arvid Nicolaas](https://github.com/vitoke)
Created and maintained by [Arvid Nicolaas](https://github.com/vitoke).

## Contributing

Feel very welcome to contribute to further improve Rimbu. Please read our [Contributing guide](https://github.com/rimbu-org/rimbu/blob/main/CONTRIBUTING.md).
We welcome contributions! Please read our [Contributing guide](https://github.com/rimbu-org/rimbu/blob/main/CONTRIBUTING.md).

## Contributors

<img src = "https://contrib.rocks/image?repo=rimbu-org/rimbu"/>

Made with [contributors-img](https://contrib.rocks).
_Made with [contributors-img](https://contrib.rocks)._

## License

Licensed under the MIT License, Copyright © 2020-present Arvid Nicolaas.

See [LICENSE](./LICENSE) for more information.
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) for details.
Loading

0 comments on commit 19ace35

Please sign in to comment.