Yuncheol Kwak

Merge branch 'feature/language_guess' into develop

1 +import {franc} from 'franc';
2 +import langs from 'langs';
3 +
4 +function getLang(se) {
5 + let langCode = "";
6 + if(se.length < 10) {
7 + langCode = franc(se, {minLength:`${se.length}`});
8 + } else {
9 + langCode = franc(se);
10 + }
11 + return langs.where('3', langCode).local;
12 +}
13 +
14 +export {getLang};
...\ No newline at end of file ...\ No newline at end of file
1 { 1 {
2 "dependencies": { 2 "dependencies": {
3 "googleapis": "^100.0.0", 3 "googleapis": "^100.0.0",
4 - "youtube-v3-api": "^1.1.1" 4 + "youtube-v3-api": "^1.1.1",
5 - } 5 + "franc": "^6.0.0",
6 + "langs": "^2.0.0"
7 + },
8 + "type": "module"
6 } 9 }
......