Compare commits

...

6 Commits

Author SHA1 Message Date
Mathias Bynens
cd4e9fd107 Update index.js 2020-12-10 15:58:55 +01:00
Surma
c3d05e0e2d Merge pull request #892 from XhmikosR/gitignore 2020-12-10 14:00:56 +00:00
Surma
0c848a33ad Merge branch 'dev' into gitignore 2020-12-10 13:49:38 +00:00
Surma
8b20aa5f14 Merge branch 'dev' into gitignore 2020-12-10 13:11:45 +00:00
XhmikosR
a972dfdeed Update .gitignore 2020-12-10 14:29:53 +02:00
XhmikosR
522449adc1 Add .DS_Store to .gitignore. 2020-12-09 22:35:41 +02:00
4 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ node_modules
*.css.d.ts
build
*.o
.DS_Store
# Auto-generated by lib/feature-plugin.js
src/features-worker/index.ts

BIN
cli/.DS_Store vendored

Binary file not shown.

1
cli/.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules
build
.DS_Store

View File

@@ -19,11 +19,11 @@ function clamp(v, min, max) {
return v;
}
const suffix = ['B', 'KB', 'MB'];
const suffix = ['B', 'KiB', 'MiB'];
function prettyPrintSize(size) {
const base = Math.floor(Math.log2(size) / 10);
const index = clamp(base, 0, 2);
return (size / 2 ** (10 * index)).toFixed(2) + suffix[index];
return (size / 2 ** (10 * index)).toFixed(2) + ' ' + suffix[index];
}
async function decodeFile(file) {