Package Exports
- lang-codes
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lang-codes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
lang-codes
Easily searchable ISO 639-1/2/3 Language codes
Table of Contents
About
Easily searchable ISO 639-1/2/3 language codes with English and local names (under 6kB gzipped). Data extracted from nodejs-langs.
Install
This project uses node and npm.
$ npm install lang-codes
$ # OR
$ yarn add lang-codes
Usage
import find from 'lang-codes'
find('afr') // { 'name': 'Afrikaans', 'local': 'Afrikaans', '1': 'af', '2': 'afr', '2T': 'afr', '2B': 'afr', '3': 'afr' }
find(/af/) // [ { '1': 'aa', '2': 'aar', '3': 'aar', name: 'Afar', local: 'Afaraf', '2T': 'aar', '2B': 'aar' }, { '1': 'af', '2': 'afr', '3': 'afr', name: 'Afrikaans', local: 'Afrikaans', '2T': 'afr', '2B': 'afr' } ]
find('zul', { props: 'name' }) // Zulu
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT