# @tangle/simple-set

> a strategy for Set-like transformations

Latest version **3.0.1** (published 2023-03-01) · LGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @tangle/simple-set
pnpm add @tangle/simple-set
yarn add @tangle/simple-set
bun add @tangle/simple-set
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2023-03-01 |
| First published | 2020-10-11 |
| Weekly downloads | 0 |
| License | LGPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mixmix |
| Maintainers | mixmix, chereseeriepa, cpilbrow |
| Keywords | tangle, strategy |

## Links

- npm: https://www.npmjs.com/package/@tangle/simple-set
- Repository: https://gitlab.com/tangle-js/strategies/simple-set
- Homepage: https://gitlab.com/tangle-js/strategies/simple-set#readme
- Issues: https://gitlab.com/tangle-js/strategies/simple-set/issues
- npm.io page: https://npm.io/package/@tangle/simple-set

## Dependencies (1)

- [is-my-json-valid](https://npm.io/package/is-my-json-valid.md) ^2.20.5

## Recent versions

- 3.0.1 (latest) — 2023-03-01
- 3.0.0 — 2021-12-05
- 2.1.0 — 2021-10-31
- 2.0.0 — 2021-01-26
- 1.2.2 — 2020-11-02
- 1.2.1 — 2020-11-02
- 1.2.0 — 2020-11-01
- 1.1.0 — 2020-10-28
- 1.0.0 — 2020-10-11

## README

# @tangle/simple-set

see tests for examples.

## API

### `SimpleSet(idPattern) => simpleSet`

- `idPattern` *String* (optional)
    - a pattern which all id's going into the set must pass
    - default `'^.+$'`

### `simpleSet.schema`
### `simpleSet.isValid`
### `simpleSet.identity() => I`
### `simpleSet.concat() => I`
### `simpleSet.mapFromInput(input, currentTips) => T`
### `simpleSet.mapToOutput(T) => t`

### `simpleSet.isConflict() => False`
### `simpleSet.isValidMerge() => True`
### `simpleSet.merge(graph, mergeNode, field) => T`
where:
- `graph` is a `@tangle/graph` instance
- `mergeNode` is the proposed merge-node
- `field` *String* contains the the data fields `node.data[field]`

Used with modules such as:
- @tangle/strategy@2
- ssb-crut

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