komodojp / tinyld

Simple and Performant Language detection library for NodeJS
https://komodojp.github.io/tinyld/
MIT License
415 stars 12 forks source link

Not working with Deno #12

Closed kefniark closed 2 years ago

kefniark commented 2 years ago

Description

I was trying to use tinyld in a deno project but run into an issue, I can't import the library, it explode for a weird reason.

error: The module's source code could not be parsed: Unexpected character 'ำ'

It seem to be caused by a unique thai character in the profile language (json)

 //...
 อ: 9,
 ฮ: 9,
 ะ: 9,
 า: 9,
  ำ: 9, // <= this line
 //...

I opened an issue on deno repo https://github.com/denoland/deno/issues/13468

P.S. apparently a swc issue: https://github.com/swc-project/swc/issues/3341