@begin/chunker
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -19,5 +19,7 @@ const { readdir, readFile, writeFile } = require('fs/promises') | ||
let count = Math.ceil(raw.length / maxSize) | ||
let positions = String(count).length | ||
let loop = new Array(count).fill(0) | ||
loop.forEach((zero, i) => { | ||
let name = `${guid}-${i}-${count}` | ||
let num = String(i + 1).padStart(positions, '0') | ||
let name = `${guid}-${num}-${count}` | ||
let start = i * maxSize | ||
@@ -24,0 +26,0 @@ let end = (i + 1) * maxSize |
{ | ||
"name": "@begin/chunker", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Chunk binary files into smaller pieces", | ||
@@ -5,0 +5,0 @@ "scripts": { |
3992
51