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

https://github.com/luckasnix/structured-objects

Structured Objects is lightweight and powerful library for handling object in JavaScript/TypeScript in different types of data structures.
https://github.com/luckasnix/structured-objects

data-structures graph javascript library typescript vite

Last synced: 9 months ago
JSON representation

Structured Objects is lightweight and powerful library for handling object in JavaScript/TypeScript in different types of data structures.

Awesome Lists containing this project

README

          

# Structured Objects

Structured Objects is lightweight and powerful library for handling object in JavaScript/TypeScript in different types of data structures.

## Installation

npm:

```bash
npm i @kasnix/structured-objects
```

Yarn:

```bash
yarn add @kasnix/structured-objects
```

pnpm:

```bash
pnpm add @kasnix/structured-objects
```

Deno:

```bash
deno add npm:@kasnix/structured-objects
```

Bun:

```bash
bun add @kasnix/structured-objects
```

## Usage

```typescript
import { ObjectGraph } from "@kasnix/structured-objects/object-graph";

type DataItem = {
id: string;
// ...
};

const dataList: Array = [/* ... */];

const dataGraph = new ObjectGraph(dataList, (dataItem) => dataItem.id);
```

## Documentation

- [Object Graph](./docs/object-graph.doc.md)