https://github.com/kwonoj/whichlang-wasm
https://github.com/kwonoj/whichlang-wasm
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kwonoj/whichlang-wasm
- Owner: kwonoj
- License: mit
- Created: 2023-08-19T18:03:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-16T10:04:44.000Z (almost 3 years ago)
- Last Synced: 2025-09-23T16:44:44.603Z (10 months ago)
- Language: Rust
- Size: 23.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Whichlang-wasm
`whichlang-wasm` is a thin webassembly bindings to [whichlang](https://github.com/quickwit-oss/whichlang) library.
### Installation
```bash
npm install whichlang-wasm
```
### Usage
This bindings exports a single interface `detectLanguage` which takes a string and returns a iso 6391 based language code.
```ts
const { detectLanguage } = require("whichlang-wasm");
const text = "한글 텍스트";
const language = detectLanguage(text);
console.log(language) // KO
```