@labset/leveldb-registry
v1.3.0
Published
leveldb registry
Downloads
14
Readme
leveldb-registry
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();