From 167a0bb6faa0459a27dd86f8e6eaf3f8de76f6fd Mon Sep 17 00:00:00 2001 From: razonyang Date: Tue, 18 Jun 2024 14:11:59 +0800 Subject: [PATCH] fix: correct flag numbers parsing --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index c835e1f..a164ae4 100755 --- a/index.js +++ b/index.js @@ -44,12 +44,12 @@ const lorem = new LoremIpsum({ program .name('lorem-ipsum-generator') - .requiredOption('-n, --number ', 'number of content', parseInt) - .option('--paginate ', 'how many content per folder', parseInt, 1000) + .requiredOption('-n, --number ', 'number of content', parseFloat) + .option('--paginate ', 'how many content per folder', parseFloat, 1000) .option('-o, --output ', 'output folder', 'content') - .option('--tag-count ', '', parseInt, 5) - .option('--category-count ', '', parseInt, 3) - .option('--series-count ', '', parseInt, 1) + .option('--tag-count ', '', parseFloat, 5) + .option('--category-count ', '', parseFloat, 3) + .option('--series-count ', '', parseFloat, 1) program.parse()