mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-22 12:33:38 +08:00
8 lines
263 B
TypeScript
8 lines
263 B
TypeScript
import * as chardet from "chardet";
|
|
|
|
chardet.detect(new Buffer('hello there!'));
|
|
chardet.detectFile('/path/to/file', (err, encoding) => {});
|
|
chardet.detectFileSync('/path/to/file');
|
|
|
|
chardet.detectFile('/path/to/file', { sampleSize: 32 }, (err, encoding) => {});
|