(key: string[])
| 158 | }) |
| 159 | |
| 160 | export async function remove(key: string[]) { |
| 161 | const dir = await state().then((x) => x.dir) |
| 162 | const target = path.join(dir, ...key) + ".json" |
| 163 | return withErrorHandling(async () => { |
| 164 | await fs.unlink(target).catch(() => {}) |
| 165 | }) |
| 166 | } |
| 167 | |
| 168 | export async function read<T>(key: string[]) { |
| 169 | const dir = await state().then((x) => x.dir) |
no test coverage detected