|
|
|
@ -5,6 +5,7 @@
@@ -5,6 +5,7 @@
|
|
|
|
|
import fs from 'node:fs'; |
|
|
|
|
import { readdir, readFile } from 'node:fs/promises'; |
|
|
|
|
import { resolve } from 'node:path'; |
|
|
|
|
import { Buffer } from 'node:buffer'; |
|
|
|
|
import md5 from 'md5'; |
|
|
|
|
|
|
|
|
|
class Common { |
|
|
|
@ -209,7 +210,7 @@ class Common {
@@ -209,7 +210,7 @@ class Common {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
byteSize(str) { |
|
|
|
|
return new Blob([str]).size; |
|
|
|
|
return Buffer.byteLength(str, 'utf8'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|