Gathering detailed insights and metrics for langs
Gathering detailed insights and metrics for langs
Gathering detailed insights and metrics for langs
Gathering detailed insights and metrics for langs
ISO 639-1/2/3 Language codes with English and local names
npm install langs
Typescript
Module System
Node Version
NPM Version
99.3
Supply Chain
99.5
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
10,289,573
Last Day
7,417
Last Week
33,521
Last Month
138,033
Last Year
2,233,728
116 Stars
23 Commits
21 Forks
3 Watching
2 Branches
5 Contributors
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
langs@2.0.0
Size
9.91 kB
NPM Version
4.1.2
Node Version
7.7.3
Publised On
19 Mar 2017
Cumulative downloads
Total Downloads
Last day
3%
7,417
Compared to previous day
Last week
-10.2%
33,521
Compared to previous week
Last month
3.5%
138,033
Compared to previous month
Last year
49.2%
2,233,728
Compared to previous year
$ npm install langs
This library provides ISO 639-1/2/3 language codes with English and local names. It can be installed in whichever way you prefer, but I recommend NPM.
ISO 639 is broken up into many different parts, each either defining language codes or defining standards for codes in later versions. The ones included in this library are:
ISO 639-1
2 characters, one per language or ISO 639 macrolanguageISO 639-2/2T
3 characters, one per languageISO 639-2B
3 characters, mostly the same as 639-2T
but with some derived from their English name rather than local nameISO 639-3
3 characters, mostly the same as 639-2T
but using the canonical ISO 639 macrolanguage codeThe macrolanguages described above cover cases where a language is considered
to be a dialect of another in some standards but not in others, e.g Standard
Arabic arb
and Arabic ara
. There's more information on the
Wikipedia page.
1var langs = require('langs'); 2 3langs.all(); 4// [ 5// {"name":"English", "local":"English", "1":"en", "2":"eng", "2T":"eng", "2B":"eng", "3":"eng"}, 6// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"}, 7// ... 8// ] 9 10langs.names(); 11// [ 12// "English", 13// "Korean", 14// ... 15// ] 16 17langs.names(true); 18// [ 19// "English", 20// "한국어", 21// ... 22// ] 23 24langs.codes("1"); 25// [ 26// "en", 27// "ko", 28// ... 29// ] 30 31langs.codes("2T" /*same as "2"*/); 32// [ 33// "eng", 34// "kor", 35// ... 36// ] 37 38langs.codes("2B"); 39// [ 40// "eng", 41// "kor", 42// ... 43// ] 44 45langs.codes("3"); 46// [ 47// "eng", 48// "kor", 49// ... 50// ] 51 52langs.where("name", "Korean"); 53// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 54 55langs.where("local", "한국어, 조선어"); 56// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 57 58langs.where("1", "ko"); 59// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 60 61langs.where("2", "kor"); 62// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 63 64langs.where("2T", "kor"); 65// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 66 67langs.where("2B", "kor"); 68// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 69 70langs.where("3", "kor"); 71// {"name":"Korean", "local":"한국어", "1":"ko", "2":"kor", "2T":"kor", "2B":"kor", "3":"kor"} 72 73langs.has("name", "Korean"); 74// true 75 76langs.has("local", "한국어, 조선어"); 77// true 78 79langs.has("1", "ko"); 80// true 81 82langs.has("2", "kor"); 83// true 84 85langs.has("2T", "kor"); 86// true 87 88langs.has("2B", "kor"); 89// true 90 91langs.has("3", "kor"); 92// true 93 94langs.has("name", "Geordie"); 95// false 96 97langs.has("high", "fives"); 98// false
I accept contributions to the source via Pull Request, but passing unit tests must be included before it will be considered for merge.
1$ curl -O https://raw.githubusercontent.com/adlawson/vagrantfiles/master/nodejs/Vagrantfile 2$ vagrant up 3$ vagrant ssh 4$ cd /srv 5 6$ npm test
The content of this library is released under the MIT License by
Andrew Lawson.
You can find a copy of this license in
LICENSE
or at http://www.opensource.org/licenses/mit.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 4/20 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More