mol_plot_all 1.2.1551 → 1.2.1553

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.mjs CHANGED
@@ -3123,6 +3123,22 @@ var $;
3123
3123
  return pos - from;
3124
3124
  }
3125
3125
  $.$mol_charset_encode_to = $mol_charset_encode_to;
3126
+ function $mol_charset_encode_size(str) {
3127
+ let size = 0;
3128
+ for (let i = 0; i < str.length; i++) {
3129
+ let code = str.charCodeAt(i);
3130
+ if (code < 0x80)
3131
+ size += 1;
3132
+ else if (code < 0x800)
3133
+ size += 2;
3134
+ else if (code < 0xd800 || code >= 0xe000)
3135
+ size += 3;
3136
+ else
3137
+ size += 4;
3138
+ }
3139
+ return size;
3140
+ }
3141
+ $.$mol_charset_encode_size = $mol_charset_encode_size;
3126
3142
  })($ || ($ = {}));
3127
3143
 
3128
3144
  ;
package/node.test.js CHANGED
@@ -3114,6 +3114,22 @@ var $;
3114
3114
  return pos - from;
3115
3115
  }
3116
3116
  $.$mol_charset_encode_to = $mol_charset_encode_to;
3117
+ function $mol_charset_encode_size(str) {
3118
+ let size = 0;
3119
+ for (let i = 0; i < str.length; i++) {
3120
+ let code = str.charCodeAt(i);
3121
+ if (code < 0x80)
3122
+ size += 1;
3123
+ else if (code < 0x800)
3124
+ size += 2;
3125
+ else if (code < 0xd800 || code >= 0xe000)
3126
+ size += 3;
3127
+ else
3128
+ size += 4;
3129
+ }
3130
+ return size;
3131
+ }
3132
+ $.$mol_charset_encode_size = $mol_charset_encode_size;
3117
3133
  })($ || ($ = {}));
3118
3134
 
3119
3135
  ;