Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aoijs/aoi.structures

Abstract Data Structures That Make Storing data Much easy.
https://github.com/aoijs/aoi.structures

data-structures structures typescript

Last synced: about 2 months ago
JSON representation

Abstract Data Structures That Make Storing data Much easy.

Awesome Lists containing this project

README

        

# @aoijs/aoi.structures

A collection of data structures implemented in TypeScript that ease the storage and manipulation of data.

## Installation

```bash
npm install @aoijs/aoi.structures
```

## Usage

```typescript
//Typescript
import { Group } from '@aoijs/aoi.structures';

const group = new Group(10); // Creates a group with a capacity of 10

group.set("Hello", "World"); // Sets the value of "Hello" to "World"
group.get("Hello"); // Returns "World"

group.has("Hello"); // Returns true

group.delete("Hello"); // Deletes the value of "Hello"
group.has("Hello"); // Returns false

```

```javascript
//Javascript cjs

const { Group } = require('@aoijs/aoi.structures');

const group = new Group(10); // Creates a group with a capacity of 10

group.set("Hello", "World"); // Sets the value of "Hello" to "World"
group.get("Hello"); // Returns "World"

group.has("Hello"); // Returns true

group.delete("Hello"); // Deletes the value of "Hello"
group.has("Hello"); // Returns false
```

## Documentation

[Documentation](https://aoijs.github.io/aoi.structures/)

## License

[MIT](./LICENSE)