# colage

> Converted multi language meta information COuntries|LAnguages|GEnres.

Latest version **0.2.0** (published 2019-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install colage
pnpm add colage
yarn add colage
bun add colage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-11-09 |
| First published | 2019-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | rickylawson |
| Keywords | ISO, 639, 639-1, ISO 639-1, 3166, 3166-1, ISO 3166-1, 3166-1 alpha-2, ISO 3166-1 alpha-2, lang, langs, language, languages, country, countries, genre, genres |

## Links

- npm: https://www.npmjs.com/package/colage
- Repository: https://github.com/GulfStreamJS/colage
- Homepage: https://gulfstream.to
- Issues: https://github.com/GulfStreamJS/colage/issues
- npm.io page: https://npm.io/package/colage

## Recent versions

- 0.2.0 (latest) — 2019-11-09
- 0.1.1 — 2019-11-09
- 0.0.1 — 2019-03-15

## README

## What is COLAGE?

Converted multi language meta information `CO`untries`LA`nguages`GE`nres.

## Installation

```bash
npm i colage
```

## Usage

Import the library in your code:

```js
const colage = require('colage');
```

Convert country names (string) to ISO 3166-1 (array)
```js
let iso_3166_1 = colage.co('Россия, Deutschland, 中国');
console.log(iso_3166_1); //=> [ 'RU', 'DE', 'CN' ]
```
Convert country ISO 3166-1 (array) to names (array)
```js
let en_countries = colage.co([ 'RU', 'DE', 'CN' ], 'en');
console.log(en_countries);  //=> [ 'Russia', 'Germany', 'China' ]
```

Convert language names (string) to ISO 639-1 (array)
```js
let iso_639_1 = colage.la('русский, deutsch, 中文');
console.log(iso_639_1); //=> [ 'ru', 'de', 'zh' ]
```
Convert language ISO 639-1 (array) to names (array)
```js
let en_languages = colage.la([ 'ru', 'de', 'zh' ], 'en');
console.log(en_languages);  //=> [ 'Russian', 'German', 'Chinese' ]
```

Convert genre names (string) to codes (array)
```js
let codes = colage.ge('комедия, musikalisch, 动作');
console.log(codes); //=> [ '8', '21', '1' ]
```
Convert genre codes (array) to names (array)
```js
let en_genres = colage.ge([ '8', '21', '1' ], 'en');
console.log(en_genres);  //=> [ 'comedy', 'musical', 'action' ]
```

Convert country ISO 3166-1 (string) to languages ISO 639-1 (array)
```js
let iso_639_1 = colage.c2l('CH'); // Switzerland
console.log(iso_639_1); //=> [ 'de', 'fr', 'it', 'rm' ]
```

Convert job (string) to department (string)
```js
let department = colage.j2d('Story');
console.log(department); //=> Writing
```

## Running tests

```bash
npm test
```

---
_Source: https://npm.io/package/colage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
