(dbPath: string)
| 80 | |
| 81 | // Read an existing database |
| 82 | export async function readDb(dbPath: string): Promise<Low<Schema>> { |
| 83 | const adapter = new JSONFile<Schema>(dbPath); |
| 84 | const db = new Low(adapter, defaultData); |
| 85 | await db.read(); |
| 86 | return db; |
| 87 | } |
| 88 | |
| 89 | // Delete a database |
| 90 | export async function deleteDb(dbPath: string): Promise<void> { |