# hyperfact

> Store data as a unified JSON-LD graph.

Latest version **0.1.0-alpha.7** (published 2019-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install hyperfact
pnpm add hyperfact
yarn add hyperfact
bun add hyperfact
```

## 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.0-alpha.7 |
| Published | 2019-04-24 |
| First published | 2019-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Angelo Veltens |
| Maintainers | aveltens |
| Keywords | json-ld, linked data, rdf, store, solid |

## Links

- npm: https://www.npmjs.com/package/hyperfact
- Repository: https://gitlab.com/angelo-v/hyperfact
- Homepage: https://gitlab.com/angelo-v/hyperfact#readme
- Issues: https://gitlab.com/angelo-v/hyperfact/issues
- npm.io page: https://npm.io/package/hyperfact

## Dependencies (3)

- [jsonld](https://npm.io/package/jsonld.md) ^1.6.0
- [freezer-js](https://npm.io/package/freezer-js.md) ^0.14.1
- [event-pubsub](https://npm.io/package/event-pubsub.md) ^4.3.0

## Recent versions

- 0.1.0-alpha.7 (latest) — 2019-04-24
- 0.1.0-alpha.6 — 2019-04-24
- 0.1.0-alpha.5 — 2019-02-19
- 0.1.0-alpha.4 — 2019-02-19
- 0.1.0-alpha.3 — 2019-02-18
- 0.1.0-alpha.2 — 2019-02-15
- 0.1.0-alpha.1 — 2019-02-12
- 0.0.1 — 2019-02-11

## README

# Hyperfact

Store data as a unified JSON-LD graph.

This experimental. Expect things to change.

# Quick start

```ecmascript 6
import createStore from "hyperfact";

const facts = createStore();

// add facts to the store (this is async!)
facts.merge({
              "@context": "http://schema.org/",
              "@id": "https://people.example/profile/jane#me",
              "@type": "Person",
              "name": "Jane Doe",
              "jobTitle": "Professor",
            });
            
// subscribe to changes
facts.subscribe('https://people.example/profile/jane#me', (current, prev) => {
  console.log('updated', {current, prev});
});

// get facts
const data = facts.getResource('https://people.example/profile/jane#me');
console.log()
```

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