diff --git a/lib/download.js b/lib/download.js index fe1abc1..eb1d89a 100644 --- a/lib/download.js +++ b/lib/download.js @@ -3,7 +3,6 @@ const path = require("path"); const fs = require("mz/fs"); const mkdirp = require("mkdirp-then"); const request = require("requisition"); -const zfill = require("zfill"); const { JSDOM } = require("jsdom"); const FILENAME_PREFIX = "chapter"; @@ -39,7 +38,7 @@ async function downloadAllChapters(manifest, startChapterURL, cachePath, manifes await mkdirp(cachePath); while (currentChapter !== null) { - const filename = `${FILENAME_PREFIX}${zfill(chapterIndex, 3)}.html`; + const filename = `${FILENAME_PREFIX}${chapterIndex.toString().padStart(3, "0")}.html`; console.log(`Downloading ${currentChapter}`); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c2d67bf..aab91db 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2114,11 +2114,6 @@ "decamelize": "^1.2.0" } }, - "zfill": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/zfill/-/zfill-0.0.2.tgz", - "integrity": "sha1-tzfH9xhK13hMd4QNkgMczor3eUQ=" - }, "zip-stream": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-2.1.2.tgz", diff --git a/package.json b/package.json index dd70a64..69aa258 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,7 @@ "thenify": "^3.3.0", "throat": "^5.0.0", "xmlserializer": "^0.6.1", - "yargs": "^13.3.0", - "zfill": "0.0.2" + "yargs": "^13.3.0" }, "devDependencies": { "eslint": "6.1.0"