@labset/leveldb-registry
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

leveldb-registry

Quality Gate Status Known Vulnerabilities

install it

  • npm
npm install leveldb-registry --save
  • yarn
yarn add leveldb-registry

use it

import { Identifiable, leveldbRegistry } from "leveldb-registry";

type User = Identifiable & {
  name: string;
};

const registry = leveldbRegistry<User>({
  localPath: ".example",
});

const user = await registry.add({ id: randomUUID(), name: "haz" });
const found = await registry.fetch(user.id);

const users = await registry.list();
const userIds = await registry.ids();

Readme

Keywords

Package Sidebar

Install

npm i @labset/leveldb-registry

Weekly Downloads

4

Version

1.3.0

License

Apache-2.0

Unpacked Size

22.9 kB

Total Files

7

Last publish

Collaborators

  • viqueen