mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
15 lines
280 B
TypeScript
15 lines
280 B
TypeScript
import detect = require('franc');
|
|
|
|
const testText = 'This is an example sentence';
|
|
const testOptions = {
|
|
minLength: 3,
|
|
whitelist: ['eng'],
|
|
blacklist: [],
|
|
};
|
|
|
|
detect(testText);
|
|
detect(testText, testOptions);
|
|
|
|
detect.all(testText);
|
|
detect.all(testText, testOptions)[0];
|