Files
DefinitelyTyped/types/chardet/chardet-tests.ts
2018-04-26 15:20:59 -07:00

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) => {});