# @jlguenego/set

> More operations on Sets: union, intersection, include, etc.

Latest version **1.4.0** (published 2021-03-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @jlguenego/set
pnpm add @jlguenego/set
yarn add @jlguenego/set
bun add @jlguenego/set
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2021-03-01 |
| First published | 2021-02-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 115.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jlguenego |
| Keywords | set, union, intersection, include |

## Links

- npm: https://www.npmjs.com/package/@jlguenego/set
- npm.io page: https://npm.io/package/@jlguenego/set

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2021-03-01
- 1.3.1 — 2021-02-24
- 1.3.0 — 2021-02-24
- 1.2.0 — 2021-02-24
- 1.1.0 — 2021-02-19
- 1.0.1 — 2021-02-19
- 1.0.0 — 2021-02-19
- 0.0.3 — 2021-02-19
- 0.0.2 — 2021-02-16

## README

# Set

Set utility in Javascript (and Typescript).

Set are native in Javascript (since ES6). But the supported operations are limited. No union, intersection, include, etc.
This library tries to provide all missing basic functions.

This library covers the concept exposed in the 1972 book from Aho & Ullman, The Theory of Parsing, Translation, and Compiling.

## Install

```
npm i @jlguenego/set
```

This library exposes both:

- **ES2015** module that can be tree-shaked by Webpack for Angular etc.
- **CommonJS** module for traditionnal node way.

It is ready to use for both browsers and node app.

## Usage

```ts
const a = new Set([1, 2, 3]);
const b = new Set([3, 4, 5]);
const c = Sets.union(a, b);
const d = new Set([1, 2, 3, 4, 5]);
assert(Sets.areEquals(c, d));
const e = Sets.intersection(a, b);
const f = new Set([3]);
assert(Sets.areEquals(e, f));
// etc.
```

## API

[See the typedoc documentation](./docs/api/modules.md)

## Examples

[See all examples in the test suite.](./test)

## Participating

Do not hesitate to bring your contribution to this project. Fork and Pull Request are welcome.

## Bibliography

- [Aho & Ullman, The Theory of Parsing, Translation, and Compiling](https://dl.acm.org/doi/book/10.5555/578789)

## License

ISC

## Author

Jean-Louis GUENEGO <jlguenego@gmail.com>

```

```

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