# triplecheck-core

> Core contracts and utilities for TripleCheck.

Latest version **1.0.0** (published 2021-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install triplecheck-core
pnpm add triplecheck-core
yarn add triplecheck-core
bun add triplecheck-core
```

## 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 | 1.0.0 |
| Published | 2021-05-18 |
| First published | 2021-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 835.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mikael Vesavuori |
| Maintainers | mikaelvesavuori |
| Keywords | triplecheck, triplecheck-core, contract-testing, consumer-contracts, pacts |

## Links

- npm: https://www.npmjs.com/package/triplecheck-core
- npm.io page: https://npm.io/package/triplecheck-core

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-05-18
- 0.0.1 — 2021-04-24

## README

# triplecheck-core

![TripleCheck Core](readme/triplecheck-core.png)

## TripleCheck: Core contracts and utilities

_If you are just a regular user of TripleCheck (CLI and/or broker) you won't need to think about this package at all._

This repo contains core functionality that is shared across `triplecheck` projects, such as the base [repository contract](https://hannesdorfmann.com/android/evolution-of-the-repository-pattern/) to be used by any concrete implementations that handle database actions for TripleCheck. To use a vendor-specific solution there needs to be a compatible Repository built for it. [Check this list for currently available repositories written by myself](https://github.com/mikaelvesavuori?tab=repositories&q=triplecheck-repository&type=&language=&sort=).

TripleCheck and its repositories are written in Typescript.

## Installation

Install as a dependency with `npm install triplecheck-core` or `yarn install triplecheck-core`.

## Documentation

See the generated documentation under `/docs`.

## The Repository class

You should `implement` the Repository class for your concrete implementation.

```TypeScript
export abstract class Repository {
  abstract getData(key: string): Promise<any>;
  abstract updateData(key: string, data: any): Promise<void>;
  abstract deleteData(key: string): Promise<void>;
}
```

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