mol_dump_lib 0.0.870 → 0.0.872
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.d.ts +1 -0
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +16 -0
- package/node.js.map +1 -1
- package/node.mjs +16 -0
- package/node.test.js +16 -0
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +16 -0
- package/web.js.map +1 -1
- package/web.mjs +16 -0
package/web.js
CHANGED
|
@@ -5562,6 +5562,22 @@ var $;
|
|
|
5562
5562
|
return pos - from;
|
|
5563
5563
|
}
|
|
5564
5564
|
$.$mol_charset_encode_to = $mol_charset_encode_to;
|
|
5565
|
+
function $mol_charset_encode_size(str) {
|
|
5566
|
+
let size = 0;
|
|
5567
|
+
for (let i = 0; i < str.length; i++) {
|
|
5568
|
+
let code = str.charCodeAt(i);
|
|
5569
|
+
if (code < 0x80)
|
|
5570
|
+
size += 1;
|
|
5571
|
+
else if (code < 0x800)
|
|
5572
|
+
size += 2;
|
|
5573
|
+
else if (code < 0xd800 || code >= 0xe000)
|
|
5574
|
+
size += 3;
|
|
5575
|
+
else
|
|
5576
|
+
size += 4;
|
|
5577
|
+
}
|
|
5578
|
+
return size;
|
|
5579
|
+
}
|
|
5580
|
+
$.$mol_charset_encode_size = $mol_charset_encode_size;
|
|
5565
5581
|
})($ || ($ = {}));
|
|
5566
5582
|
|
|
5567
5583
|
;
|