# record-set

> { a, b, c }

Latest version **0.1.1** (published 2017-08-20) · Apache 2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-08-20 |
| First published | 2016-03-28 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Will O'Brien |
| Maintainers | will-ob |

## Links

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

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [immutable](https://npm.io/package/immutable.md) ^3.7.6
- [record-pack](https://npm.io/package/record-pack.md) 0.1.0
- [eventemitter2](https://npm.io/package/eventemitter2.md) ^1.0.0

## Recent versions

- 0.1.1 (latest) — 2017-08-20
- 0.0.4 — 2016-04-02
- 0.0.3 — 2016-03-28

## README

# Record Set

 { a, b, c } <== [ c, u, u, r, c, c, u ...

 c - create message
 u - update message
 r - remove message

Changes can be created with [`record-pack`](https://github.com/f7ops/record-pack).

```
var RecordSet = require('record-set'),
    set = new RecordSet();

// Apply a change from 'record-pack'
set.apply([ ... ])
  => return self

// Object representation
set.toJS()
  => { ... }
set.toImmutableJs()
  => Immutable.js hashmap
set.toRecords();
  => Array of records required to rebuild set

// RecordPack accessible for convenience
//   dont forget to `apply` changes!
var b = new RecordSet.RecordPack.Builder();

b.create()
  => c1
b.update(id, "d", 4);
  => u1
b.update(id, "e", 4);
  => u2
b.destroy(id)
  => d1

set.apply([c1, u1, u2, d1]);
```

#### Make Changes to Set

`apply` -- changes, in the form of RecordPack records, can update the set.

#### Display

`toJS`
`toImmutable`
`toRecords`

License
-------

Copyright 2016 Will O'Brien

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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