# @tc39-proposal/set

> TC39 proposal: Implementation of set

Latest version **0.0.1** (published 2023-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tc39-proposal/set
pnpm add @tc39-proposal/set
yarn add @tc39-proposal/set
bun add @tc39-proposal/set
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-11-08 |
| First published | 2023-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | simu |
| Maintainers | simumn |
| Keywords | tc39, tc39 proposal, set |

## Links

- npm: https://www.npmjs.com/package/@tc39-proposal/set
- Repository: https://github.com/simo-an/tc39-proposal
- Homepage: https://github.com/simo-an/tc39-proposal/tree/main/packages/set
- Issues: https://github.com/simo-an/tc39-proposal/issues
- npm.io page: https://npm.io/package/@tc39-proposal/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

- 0.0.1 (latest) — 2023-11-08

## README

## TC39 proposal

https://github.com/tc39/proposal-set-methods

https://tc39.es/proposal-set-methods

## Install

Install `@tc39-proposal/set` by `pnpm`

```bash
pnpm add @tc39-proposal/set
```

## Usage

```ts
import {
  intersection,
  union,
  difference,
  symmetricDifference,
  isSubsetOf,
  isSupersetOf,
  isDisjointFrom,
} from "@tc39-proposal/set";

const s1 = new Set([1, 2, 3, 4, 5]);
const s2 = new Set([3, 4, 5, 6, 7]);

console.info(isSubsetOf(s1, s2) === false);
console.info(isSupersetOf(s1, s2) === false);
console.info(isDisjointFrom(s1, s2) === false);

let result = intersection(s1, s2);
// result => [3, 4, 5]

result = union(s1, s2);
// result => [1, 2, 3, 4, 5, 6, 7]

result = difference(s1, s2);
// result => [1, 2]

result = symmetricDifference(s1, s2);
// result => [1, 2, 6, 7]
```

## Others

Welcome to contribute and make @tc39-proposal/set better!

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