# advanced-sets

> A JS/TS library that expands upon the functionality of Sets

Latest version **0.0.2** (published 2021-01-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install advanced-sets
pnpm add advanced-sets
yarn add advanced-sets
bun add advanced-sets
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-01-09 |
| First published | 2021-01-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JP Bulman |
| Maintainers | jpbulman |
| Keywords | advanced, sets, intersection, union, complement, subset, superset |

## Links

- npm: https://www.npmjs.com/package/advanced-sets
- npm.io page: https://npm.io/package/advanced-sets

## Recent versions

- 0.0.2 (latest) — 2021-01-09
- 0.0.1 — 2021-01-09

## README

# Advanced Sets

A JS/TS library that builds extra functionality on top of the standard `Set()`

```ts
const setA = new AdvancedSet(1, 2, 4);
const setB = new AdvancedSet(2, 4, 6, 8);

setA.intersection(setB); // AdvancedSet(2, 4)
setA.union(setB); // AdvancedSet(1, 2, 4, 6, 8)
setA.toArray(); // [1, 2, 4]

const universal = new AdvancedSet('TS', 'Advanced', 'Sets');
const sub = universal.createSubset('TS');
const complement = sub.complement(); // AdvancedSet("Advanced", "Sets")

setA.filter((a) => a > 1); // AdvancedSet(2, 4)
setA.map((x) => x * 2); // AdvancedSet(2, 4, 8)

setA.add(5); // AdvancedSet(1, 2, 4, 5)
```

## Installation

```
npm i advanced-sets
```

## Documentation

https://jpbulman.github.io/Advanced-Sets/

## Local Setup

First, clone the repository and cd into the folder. Then, install all of the dependencies with

```
npm install
```

Run the test suite with

```
npm test
```

---
_Source: https://npm.io/package/advanced-sets · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
