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: about 1 month 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 a lightweight and powerful library for manipulating objects in JavaScript and TypeScript across 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 { SimilarityGraph } from "@kasnix/structured-objects/similarity-graph";

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

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

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

## Documentation

- [SimilarityGraph](./docs/similarity-graph.doc.md)
- [Migration Guide: v1 to v2](./docs/migration-guide-v1-to-v2.md)