# fancy-set

> Constrained mixin that applies set-theoretic operations to set classes

Latest version **0.1.6** (published 2023-04-22) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install fancy-set
pnpm add fancy-set
yarn add fancy-set
bun add fancy-set
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2023-04-22 |
| First published | 2022-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.1.0 |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cristian Petre |
| Maintainers | driimus |
| Keywords | set, set theory, set operations |

## Links

- npm: https://www.npmjs.com/package/fancy-set
- Repository: https://github.com/driimus/fancy-set
- Homepage: https://github.com/driimus/fancy-set#readme
- Issues: https://github.com/driimus/fancy-set/issues
- npm.io page: https://npm.io/package/fancy-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.1.6 (latest) — 2023-04-22
- 0.1.5 — 2022-05-15
- 0.1.4 — 2022-05-15
- 0.1.3 — 2022-05-11
- 0.1.2 — 2022-05-11
- 0.1.1 — 2022-05-09
- 0.1.0 — 2022-05-08

## README

# fancy-set

Constrained mixin that applies set-theoretic operations to set classes.

# Installation

```sh
pnpm add fancy-set
```

# Usage

Fancified versions of the native set class can be directly imported:

```ts
import { FancySet } from "fancy-set";

const myFancySet = new FancySet([1, 2, 3]);
const mySuperFancySet = new FancySet([1, 2, 3, 4, 5]);

mySuperFancySet.isSuperset(myFancySet); // true
```

## TypeScript support

This module ships its own type definitions, so TypeScript is supported out of the box.

## Custom sets

The `fancify` mixin can be applied to custom set implementations:

```ts
import { fancify } from "fancy-set";

class MyCustomSet extends Set {
  /** ... */
}
const MyFancyCustomSet = fancify(MyCustomSet);
```

Alternatively, custom set implementations can be derived from fancy sets:

```ts
import { fancify, FancySet } from "fancy-set";

class MyFancyCustomSet extends fancify(Set) {
  /** ... */
}
// or
class MyFancyCustomSet extends FancySet {
  /** ... */
}
```

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