1 Commits
0.1.4 ... 0.1.5

Author SHA1 Message Date
4278ea9df9 Added delete
All checks were successful
Publish Library / Build NPM Project (push) Successful in 9s
Publish Library / Tag Version (push) Successful in 8s
2026-08-22 13:01:19 -04:00
2 changed files with 7 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@ztimson/zim-utils",
"version": "0.1.4",
"version": "0.1.5",
"description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js",
"author": "Zak Timson",
"license": "MIT",

View File

@@ -86,6 +86,12 @@ export class ZimManager {
return zimCatalog(search, opts);
}
async delete(fileOrName) {
const file = await this.#resolveFile(fileOrName);
await fs.promises.unlink(file);
return {file, status: 'deleted'};
}
/** Checks whether a local ZIM has a newer version in the catalog, without downloading. */
async isOutdated(file) {
const meta = await this.#readMeta(file);