What is COLAGE?
Converted multi language meta information CO
untriesLA
nguagesGE
nres.
Installation
npm i colage
Usage
Import the library in your code:
const colage = require('colage');
Convert country names (string) to ISO 3166-1 (array)
let iso_3166_1 = colage.co('Россия, Deutschland, 中国');
console.log(iso_3166_1);
Convert country ISO 3166-1 (array) to names (array)
let en_countries = colage.co([ 'RU', 'DE', 'CN' ], 'en');
console.log(en_countries);
Convert language names (string) to ISO 639-1 (array)
let iso_639_1 = colage.la('русский, deutsch, 中文');
console.log(iso_639_1);
Convert language ISO 639-1 (array) to names (array)
let en_languages = colage.la([ 'ru', 'de', 'zh' ], 'en');
console.log(en_languages);
Convert genre names (string) to codes (array)
let codes = colage.ge('комедия, musikalisch, 动作');
console.log(codes);
Convert genre codes (array) to names (array)
let en_genres = colage.ge([ '8', '21', '1' ], 'en');
console.log(en_genres);
Convert country ISO 3166-1 (string) to languages ISO 639-1 (array)
let iso_639_1 = colage.c2l('CH');
console.log(iso_639_1);
Convert job (string) to department (string)
let department = colage.j2d('Story');
console.log(department);
Running tests
npm test