18 lines
376 B
TypeScript
18 lines
376 B
TypeScript
import simpleDB from './simpleDB.js';
|
|
|
|
export interface UserDB {
|
|
get: (key?: string) => string;
|
|
getObject: () => Record<string, string>;
|
|
remove: (key?: string) => void;
|
|
set: (key?: string, value?: string) => string;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param directory
|
|
* @returns
|
|
*/
|
|
export default function userDB(directory: string) {
|
|
return simpleDB('user', directory) as Promise<UserDB>;
|
|
}
|