mol_view_tree2_lib 1.0.38 → 1.0.40
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 +17 -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.test.js +1 -0
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -4122,6 +4122,22 @@ var $;
|
|
|
4122
4122
|
return pos - from;
|
|
4123
4123
|
}
|
|
4124
4124
|
$.$mol_charset_encode_to = $mol_charset_encode_to;
|
|
4125
|
+
function $mol_charset_encode_size(str) {
|
|
4126
|
+
let size = 0;
|
|
4127
|
+
for (let i = 0; i < str.length; i++) {
|
|
4128
|
+
let code = str.charCodeAt(i);
|
|
4129
|
+
if (code < 0x80)
|
|
4130
|
+
size += 1;
|
|
4131
|
+
else if (code < 0x800)
|
|
4132
|
+
size += 2;
|
|
4133
|
+
else if (code < 0xd800 || code >= 0xe000)
|
|
4134
|
+
size += 3;
|
|
4135
|
+
else
|
|
4136
|
+
size += 4;
|
|
4137
|
+
}
|
|
4138
|
+
return size;
|
|
4139
|
+
}
|
|
4140
|
+
$.$mol_charset_encode_size = $mol_charset_encode_size;
|
|
4125
4141
|
})($ || ($ = {}));
|
|
4126
4142
|
|
|
4127
4143
|
;
|