@dockfries/chardetng
Version:
Simple charset detector, powered by chardetng and napi-rs.
21 lines (13 loc) • 652 B
Markdown
# @dockfries/chardetng
[](https://www.npmjs.com/package/@dockfries/chardetng)  
Simple charset detector, powered by [chardetng](https://github.com/hsivonen/chardetng) and [napi-rs](https://github.com/napi-rs/napi-rs).
## Example
```typescript
import { detect } from '@dockfries/chardetng'
const guessCharset = detect(
new Uint8Array([196, 227, 186, 195, 202, 192, 189, 231])
)
console.log(guessCharset === 'GBK')
```
## License
[MIT](./LICENSE)