@lokascript/i18n 2.9.0 → 2.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/i18n",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "Grammar transformation and keyword translation for hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -64,8 +64,8 @@
64
64
  },
65
65
  "homepage": "https://github.com/codetalcott/hyperfixi/tree/main/packages/i18n#readme",
66
66
  "dependencies": {
67
- "@hyperfixi/core": "^2.9.0",
68
- "@lokascript/semantic": "^2.9.0",
67
+ "@hyperfixi/core": "^2.9.2",
68
+ "@lokascript/semantic": "^2.9.2",
69
69
  "esbuild": "^0.28.0",
70
70
  "happy-dom": "^20.10.6",
71
71
  "vite": "^8.1.4"
package/src/formatting.ts CHANGED
@@ -47,7 +47,12 @@ export class NumberFormatter {
47
47
  try {
48
48
  const result = new Intl.NumberFormat(this.locale, mergedOptions).format(value);
49
49
  // Validate result - if style is currency but no currency symbol, use fallback
50
- if (mergedOptions.style === 'currency' && !/[$€£¥₹₩₽฿₪₴₱₫₵₦]/.test(result)) {
50
+ if (
51
+ mergedOptions.style === 'currency' &&
52
+ !/[$\u20ac\u00a3\u00a5\u20b9\u20a9\u20bd\u0e3f\u20aa\u20b4\u20b1\u20ab\u20b5\u20a6]/.test(
53
+ result
54
+ )
55
+ ) {
51
56
  return this.fallbackFormat(value, mergedOptions);
52
57
  }
53
58
  // Validate result - if style is percent but no % symbol, use fallback
@@ -426,11 +426,15 @@ function isDigit(char: string): boolean {
426
426
  }
427
427
 
428
428
  function isIdentifierStart(char: string): boolean {
429
- return /[a-zA-Z_$áéíóúñÑàèìòùÀÈÌÒÙ一-龯ㄱ-ㅎㅏ-ㅣ가-힣]/.test(char);
429
+ return /[a-zA-Z_$\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00d1\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u4e00-\u9faf\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/.test(
430
+ char
431
+ );
430
432
  }
431
433
 
432
434
  function isIdentifierPart(char: string): boolean {
433
- return /[a-zA-Z0-9_$áéíóúñÑàèìòùÀÈÌÒÙ一-龯ㄱ-ㅎㅏ-ㅣ가-힣-]/.test(char);
435
+ return /[a-zA-Z0-9_$\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00d1\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u4e00-\u9faf\u3131-\u314e\u314f-\u3163\uac00-\ud7a3-]/.test(
436
+ char
437
+ );
434
438
  }
435
439
 
436
440
  function consumeWhitespace(text: string, start: number): string {