triplecheck-core

Core contracts and utilities for TripleCheck.

Usage no npm install needed!

<script type="module">
  import triplecheckCore from 'https://cdn.skypack.dev/triplecheck-core';
</script>

README

triplecheck-core

TripleCheck Core

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 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.

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.

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