{"_id":"language-tags","_rev":"3919324","name":"language-tags","description":"Work with IANA language tags.","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"time":{"modified":"2025-09-01T01:22:09.000Z","created":"2013-05-22T02:28:12.469Z","2.1.0":"2025-05-13T13:51:34.431Z","2.0.1":"2024-12-16T15:27:15.390Z","2.0.0":"2024-12-16T09:37:17.933Z","1.0.9":"2023-08-16T16:23:29.562Z","1.0.8":"2023-02-12T19:09:17.353Z","1.0.7":"2022-12-15T10:03:55.169Z","1.0.6":"2022-12-01T18:38:11.223Z","1.0.5":"2016-01-12T00:56:16.365Z","1.0.4":"2016-01-11T22:54:51.583Z","1.0.3":"2015-07-09T22:42:32.529Z","1.0.2":"2014-03-24T21:44:25.297Z","1.0.1":"2013-12-23T14:20:31.491Z","1.0.0":"2013-09-29T20:24:25.382Z","0.1.0":"2013-09-28T18:01:47.590Z","0.0.3":"2013-05-22T03:14:36.884Z","0.0.2":"2013-05-22T03:01:07.246Z","0.0.1":"2013-05-22T02:28:12.469Z"},"users":{"hecticjeff":true,"mysociety":true,"cueedee":true},"author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"versions":{"2.1.0":{"name":"language-tags","version":"2.1.0","description":"Work with IANA language tags.","main":"lib/index.js","type":"module","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"pretest":"eslint ./lib ./test","test":"c8 mocha","tests-only":"c8 mocha"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"^0.3.20"},"devDependencies":{"coveralls":"^3.1.1","eslint":"^9.17.0","mocha":"^11.0.1","c8":"^10.1.3"},"engines":{"node":">=22"},"_id":"language-tags@2.1.0","gitHead":"4c323c99010dde58261dc80ce4407e8206b1ff79","_nodeVersion":"23.11.0","_npmVersion":"11.3.0","dist":{"shasum":"004eb97cf1c4eef7c5d84b2a43f6e67081447732","size":7803,"noattachment":false,"key":"/language-tags/-/language-tags-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-2.1.0.tgz"},"_npmUser":{"name":"mcg","email":"mattcg@gmail.com"},"directories":{},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/language-tags_2.1.0_1747144294214_0.9867432397052047"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-05-13T13:51:34.431Z","publish_time":1747144294431,"_source_registry_name":"default","_cnpm_publish_time":1747144294431},"2.0.1":{"name":"language-tags","version":"2.0.1","description":"Work with IANA language tags.","main":"lib/index.js","type":"module","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"lint":"eslint ./lib ./test","test":"c8 mocha"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"^0.3.20"},"devDependencies":{"coveralls":"^3.1.1","eslint":"^9.17.0","mocha":"^11.0.1","c8":"^10.1.3"},"engines":{"node":">=22"},"_id":"language-tags@2.0.1","gitHead":"d6fd038ba6034f254c0637371d5e000db2db91d3","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"shasum":"cabb67b76c93aabc2a9496a326623adc3ed6ab02","size":7687,"noattachment":false,"key":"/language-tags/-/language-tags-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-2.0.1.tgz"},"_npmUser":{"name":"mcg","email":"mattcg@gmail.com"},"directories":{},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/language-tags_2.0.1_1734362835167_0.20575638576096877"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-16T15:27:15.390Z","publish_time":1734362835390,"_source_registry_name":"default","_cnpm_publish_time":1734362835390},"2.0.0":{"name":"language-tags","version":"2.0.0","description":"Work with IANA language tags.","main":"lib/index.js","type":"module","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"prepublishOnly":"npm run build","prebuild":"rimraf lib && mkdirp lib","build":"babel src -d lib","lint":"eslint ./src ./test","tests-only":"c8 mocha","pretest":"npm run lint","test":"npm run tests-only"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"^0.3.20"},"devDependencies":{"@babel/cli":"^7.22.10","@babel/preset-env":"^7.22.10","coveralls":"^3.1.1","eslint":"^9.17.0","mkdirp":"^3.0.1","mocha":"^11.0.1","c8":"^10.1.3","rimraf":"^6.0.1"},"engines":{"node":">=0.10"},"_id":"language-tags@2.0.0","gitHead":"3052fde14256c575c7b2f81975b7a778814ad4ca","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"shasum":"94a6502ff8f3a2bd2474096578ecf55a64599f5c","size":8726,"noattachment":false,"key":"/language-tags/-/language-tags-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-2.0.0.tgz"},"_npmUser":{"name":"mcg","email":"mattcg@gmail.com"},"directories":{},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/language-tags_2.0.0_1734341837755_0.8207783875119716"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-16T09:37:17.933Z","publish_time":1734341837933,"_source_registry_name":"default","_cnpm_publish_time":1734341837933},"1.0.9":{"name":"language-tags","version":"1.0.9","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"prepublishOnly":"npm run build","prebuild":"rimraf lib && mkdirp lib","build":"babel src -d lib","lint":"eslint --ext=js,mjs .","tests-only":"nyc mocha --recursive test","pretest":"npm run lint","test":"npm run tests-only"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"^0.3.20"},"devDependencies":{"@babel/cli":"^7.22.10","@babel/preset-env":"^7.22.10","coveralls":"^3.1.1","eslint":"^8.47.0","mkdirp":"^0.5.6","mocha":"^3.5.3","nyc":"^10.3.2","rimraf":"^2.7.1"},"engines":{"node":">=0.10"},"eslintConfig":{"parserOptions":{"ecmaVersion":2022,"sourceType":"script"},"env":{"node":true},"ignorePatterns":["!.babelrc.js"],"overrides":[{"files":"test/**","globals":{"suite":false,"test":false}}]},"_id":"language-tags@1.0.9","gitHead":"ea5aa61e53ced2a18e35783ff00bb2a533f6c77d","_nodeVersion":"20.5.1","_npmVersion":"9.8.1","dist":{"shasum":"1ffdcd0ec0fafb4b1be7f8b11f306ad0f9c08777","size":8216,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.9.tgz"},"_npmUser":{"name":"mcg","email":"mattcg@gmail.com"},"directories":{},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/language-tags_1.0.9_1692203009413_0.7087482571725519"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-16T16:23:29.562Z","publish_time":1692203009562,"_source_registry_name":"default","_cnpm_publish_time":1692203009562},"1.0.8":{"name":"language-tags","version":"1.0.8","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"^0.3.20"},"devDependencies":{"mocha":"~6.2.0","istanbul":"~0.4.2","coveralls":"~3.0.5"},"eslintConfig":{"parserOptions":{"ecmaVersion":13,"sourceType":"module"},"env":{"node":true}},"gitHead":"dcbfb23d85870cd458806374ddff0cecc6184b7b","_id":"language-tags@1.0.8","_nodeVersion":"19.4.0","_npmVersion":"9.2.0","dist":{"shasum":"042b4bdb0d4e771a9f8cc2fdc9bb26a52a367312","size":7074,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.8.tgz"},"_npmUser":{"name":"mcg","email":"mattcg@gmail.com"},"directories":{},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/language-tags_1.0.8_1676228957169_0.7848591945622727"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-12T19:09:17.353Z","publish_time":1676228957353,"_cnpm_publish_time":1676228957353},"1.0.7":{"name":"language-tags","version":"1.0.7","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"mattcg@gmail.com"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"^0.3.20"},"devDependencies":{"mocha":"~6.2.0","istanbul":"~0.4.2","coveralls":"~3.0.5"},"eslintConfig":{"parserOptions":{"ecmaVersion":13,"sourceType":"module"},"env":{"node":true}},"gitHead":"18163fc6d05cda6e625146816c0063f89e22e435","_id":"language-tags@1.0.7","_nodeVersion":"19.2.0","_npmVersion":"9.2.0","dist":{"shasum":"41cc248730f3f12a452c2e2efe32bc0bbce67967","size":7076,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.7.tgz"},"_npmUser":{"name":"mcg","email":"mattcg@gmail.com"},"directories":{},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/language-tags_1.0.7_1671098634983_0.9651817057361631"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-15T10:41:50.253Z","publish_time":1671098635169,"_cnpm_publish_time":1671098635169},"1.0.6":{"name":"language-tags","version":"1.0.6","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"m@m.cg"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"~0.3.2"},"devDependencies":{"mocha":"~2.3.4","istanbul":"~0.4.2","coveralls":"~2.11.6"},"gitHead":"5ae08f97f41ea6fce164e9b87d975c9bc21bf8d1","_id":"language-tags@1.0.5","_shasum":"d321dbc4da30ba8bf3024e040fa5c14661f9193a","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"dist":{"shasum":"d321dbc4da30ba8bf3024e040fa5c14661f9193a","size":10684,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.6.tgz"},"directories":{},"publish_time":1669919891223,"_hasShrinkwrap":false,"_cnpm_publish_time":1669919891223,"_cnpmcore_publish_time":"2021-12-14T06:51:59.725Z","deprecated":"[WARNING] Use 1.0.5 instead of 1.0.6, reason: not compatible with node 10."},"1.0.5":{"name":"language-tags","version":"1.0.5","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"m@m.cg"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"~0.3.2"},"devDependencies":{"mocha":"~2.3.4","istanbul":"~0.4.2","coveralls":"~2.11.6"},"gitHead":"5ae08f97f41ea6fce164e9b87d975c9bc21bf8d1","_id":"language-tags@1.0.5","_shasum":"d321dbc4da30ba8bf3024e040fa5c14661f9193a","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"dist":{"shasum":"d321dbc4da30ba8bf3024e040fa5c14661f9193a","size":10684,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.5.tgz"},"directories":{},"publish_time":1452560176365,"_cnpm_publish_time":1452560176365,"_hasShrinkwrap":false},"1.0.4":{"name":"language-tags","version":"1.0.4","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","author":{"name":"Matthew Caruana Galizia","email":"m@m.cg"},"repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT","scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"~0.3.2"},"devDependencies":{"mocha":"~1.18.2","istanbul":"~0.2.6","coveralls":"~2.10.0"},"gitHead":"7e2217af4e422a1631550a3118894c2d8b0c8127","_id":"language-tags@1.0.4","_shasum":"4f64d25011caeb3436a80313d91f07c640fc1d4a","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"dist":{"shasum":"4f64d25011caeb3436a80313d91f07c640fc1d4a","size":10411,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.4.tgz"},"directories":{},"publish_time":1452552891583,"_cnpm_publish_time":1452552891583,"_hasShrinkwrap":false},"1.0.3":{"name":"language-tags","version":"1.0.3","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"}],"scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"~0.3.2"},"devDependencies":{"mocha":"~1.18.2","istanbul":"~0.2.6","coveralls":"~2.10.0"},"gitHead":"0fa834c5d120018a316ce191c8d92268b66c90ed","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@1.0.3","_shasum":"21729ae53c88c89098310b1560f56c612496bd66","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.6","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"dist":{"shasum":"21729ae53c88c89098310b1560f56c612496bd66","size":10273,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.3.tgz"},"directories":{},"publish_time":1436481752529,"_cnpm_publish_time":1436481752529,"_hasShrinkwrap":false},"1.0.2":{"name":"language-tags","version":"1.0.2","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"}],"scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"~0.3.2"},"devDependencies":{"mocha":"~1.18.2","istanbul":"~0.2.6","coveralls":"~2.10.0"},"bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@1.0.2","dist":{"shasum":"46c48f02910eb5e490088b73009de8a6a0384281","size":10209,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1395697465297,"_cnpm_publish_time":1395697465297,"_hasShrinkwrap":false},"1.0.1":{"name":"language-tags","version":"1.0.1","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"},{"type":"ODC-BY","url":"http://opendatacommons.org/licenses/by/1.0/"}],"scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","m17n","multilingualization"],"dependencies":{"language-subtag-registry":"~0.3.0"},"devDependencies":{"jscoverage":"~0.3.8","mocha":"~1.16.1","mocha-lcov-reporter":"~0.0.1","coveralls":"~2.6.1"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@1.0.1","dist":{"shasum":"269bff883839dedc88d44cf166ab2b6b837b08a9","size":10280,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1387808431491,"_cnpm_publish_time":1387808431491,"_hasShrinkwrap":false},"1.0.0":{"name":"language-tags","version":"1.0.0","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"},{"type":"ODC-BY","url":"http://opendatacommons.org/licenses/by/1.0/"}],"scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","language","tags"],"dependencies":{"language-subtag-registry":"0.x"},"devDependencies":{"jscoverage":"0.x","mocha":"1.x","mocha-lcov-reporter":"0.x","coveralls":"2.x"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@1.0.0","dist":{"shasum":"e22b34093cbbcc528b5299b9d8cf638c8b68cdae","size":10252,"noattachment":false,"key":"/language-tags/-/language-tags-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1380486265382,"_cnpm_publish_time":1380486265382,"_hasShrinkwrap":false},"0.1.0":{"name":"language-tags","version":"0.1.0","implements":["CommonJS/Modules/1.0"],"description":"Work with IANA language tags.","main":"lib/index.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"},{"type":"ODC-BY","url":"http://opendatacommons.org/licenses/by/1.0/"}],"scripts":{"test":"make test"},"keywords":["iana","bcp47","subtags","rfc5646","language"],"devDependencies":{"jscoverage":"0.x","mocha":"1.x","mocha-lcov-reporter":"0.x","coveralls":"2.x"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@0.1.0","dist":{"shasum":"32faf08c47be39d3881566676a9d401267d20b81","size":298226,"noattachment":false,"key":"/language-tags/-/language-tags-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1380391307590,"_cnpm_publish_time":1380391307590,"_hasShrinkwrap":false},"0.0.3":{"name":"language-tags","version":"0.0.3","implements":["CommonJS/Modules/1.0"],"description":"Work with language tags.","main":"language-tags.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"}],"scripts":{"test":"node_modules/buster/bin/buster-test -c tests/buster.js"},"keywords":["iana","bcp47","subtags","rfc5646","language"],"devDependencies":{"buster":"0.x","buster-coverage":"*"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@0.0.3","dist":{"shasum":"251f46b0780a3a6a6028d90c0cb1c9e683f176b5","size":201710,"noattachment":false,"key":"/language-tags/-/language-tags-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-0.0.3.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1369192476884,"_cnpm_publish_time":1369192476884,"_hasShrinkwrap":false},"0.0.2":{"name":"language-tags","version":"0.0.2","implements":["CommonJS/Modules/1.0"],"description":"Work with language tags.","main":"language-tags.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"}],"scripts":{"test":"node_modules/buster/bin/buster-test -c tests/buster.js"},"keywords":["iana","bcp47","subtags","rfc5646","language"],"devDependencies":{"buster":"0.x","buster-coverage":"*"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@0.0.2","dist":{"shasum":"bc9833efcdeb68611621b23e5a13f501390b2d90","size":198638,"noattachment":false,"key":"/language-tags/-/language-tags-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1369191667246,"_cnpm_publish_time":1369191667246,"_hasShrinkwrap":false},"0.0.1":{"name":"language-tags","version":"0.0.1","implements":["CommonJS/Modules/1.0"],"description":"Work with language tags.","main":"language-tags.js","homepage":"https://github.com/mattcg/language-tags","repository":{"type":"git","url":"git://github.com/mattcg/language-tags.git"},"contributors":[{"name":"Matthew Caruana Galizia","email":"m@m.cg"}],"licenses":[{"type":"MIT","url":"http://mattcg.mit-license.org/"}],"scripts":{"test":"node_modules/buster/bin/buster-test -c tests/buster.js"},"keywords":["iana","bcp47","subtags","rfc5646","language"],"devDependencies":{"buster":"0.x","buster-coverage":"*"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"_id":"language-tags@0.0.1","dist":{"shasum":"71268bd9fe796cbb7f83582118112d20048f7af3","size":198635,"noattachment":false,"key":"/language-tags/-/language-tags-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/language-tags/download/language-tags-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"mcg","email":"m@m.cg"},"maintainers":[{"name":"mcg","email":"mattcg@gmail.com"}],"directories":{},"publish_time":1369189692469,"_cnpm_publish_time":1369189692469,"_hasShrinkwrap":false}},"readme":"# IANA Language Tags for JavaScript #\n\n[![Build Status](https://github.com/mattcg/language-tags/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/mattcg/language-tags/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/mattcg/language-tags/badge.png)](https://coveralls.io/r/mattcg/language-tags)\n\nBased on [BCP 47](https://www.rfc-editor.org/info/bcp47) ([RFC 5646](https://www.rfc-editor.org/rfc/rfc5646.html)) and the latest [IANA language subtag registry](http://www.iana.org/assignments/language-subtag-registry).\n\nThis project will be updated as the standards change.\n\n## JSON data ##\n\nSee the [language-subtag-registry](https://github.com/mattcg/language-subtag-registry) project for the underlying JSON data.\n\n## API ##\n\n```js\nimport {tags, check, subtags, filter, search, languages, language, region, type, date} from 'language-tags'\n```\n\nNote that all lookups and checks for tags and subtags are case insensitive. For formatting according to common conventions, see `tag.format`.\n\n### tags(tag) ###\n\nCheck whether a hyphen-separated tag is valid and well-formed. Always returns a `Tag`, which can be checked using the `valid` method.\n\n### check(tag) ###\n\nShortcut for `tags(tag).valid()`. Return `true` if the tag is valid, `false` otherwise. For meaningful error output see `tag.errors()`.\n\n### subtags(subtag), subtags(subtags) ###\n\nLook up one or more subtags. Returns an array of `Subtag` objects. Returns an empty array if all of the subtags are non-existent.\n\nCalling `subtags('mt')` will return an array with two `Subtag` objects: one for Malta (the 'region' type subtag) and one for Maltese (the 'language' type subtag).\n\n```\n> subtags('mt');\n[Subtag, Subtag]\n> subtags('bumblebee');\n[]\n```\n\nTo get or check a single subtag by type use `language(subtag)`, `region(subtag)` or `type(subtag, type)`.\n\n### filter(subtags) ###\n\nThe opposite of `subtags(subtags)`. Returns an array of codes that are not registered subtags, otherwise returns an empty array.\n\n```\n> filter(['en', 'Aargh']);\n['Aargh']\n```\n\n### search(description, [all]) ###\n\nSearch for tags and subtags by description. Supports either a RegExp object or a string for `description`. Returns an array of `Subtag` and `Tag` objects or an empty array if no results were found.\n\nNote that `Tag` objects in the results represent 'grandfathered' or 'redundant' tags. These are excluded by default. Set the `all` parameter to `true` to include them.\n\nSearch is case-insensitive if `description` is a string.\n\n### languages(macrolanguage) ###\n\nReturns an array of `Subtag` objects representing all the 'language' type subtags belonging to the given 'macrolanguage' type subtag.\n\nThrows an error if `macrolanguage` is not a macrolanguage.\n\n```\n> languages('zh');\n[Subtag, Subtag...]\n> languages('en');\nError: 'en' is not a valid macrolanguage.\n```\n\n### language(subtag) ###\n\nConvenience method to get a single 'language' type subtag. Can be used to validate an input value as a language subtag. Returns a `Subtag` object or `null`.\n\n```\n> language('en');\nSubtag\n> language('us');\nnull\n```\n\n### region(subtag) ###\n\nAs above, but with 'region' type subtags.\n\n```\n> region('mt');\nSubtag\n> region('en');\nnull\n```\n\n### type(subtag, type) ###\n\nGet a subtag by type. Returns the subtag matching `type` as a `Subtag` object otherwise returns `null`.\n\nA `type` consists of one of the following strings: 'language', 'extlang', 'script', 'region' or 'variant'. To get a 'grandfathered' or 'redundant' type tag use `tags(tag)`.\n\n```\n> type('zh', 'macrolanguage');\nSubtag\n> type('zh', 'script');\nnull\n```\n\n### date() ###\n\nReturns the file date for the underlying data, as a string.\n\n```\n> date();\n'2004-06-28'\n```\n\n### Subtag ###\n\n#### subtag.type() ####\n\nGet the subtag type (either 'language', 'extlang', 'script', 'region' or 'variant'). See [RFC 5646 section 2.2](http://tools.ietf.org/html/rfc5646#section-2.2) for type definitions.\n\n#### subtag.descriptions() ####\n\nReturns an array of description strings (a subtag may have more than one description).\n\n```\n> language('ro').descriptions();\n['Romanian', 'Moldavian', 'Moldovan']\n```\n\n#### subtag.preferred() ####\n\nReturns a preferred subtag as a `Subtag` object if the subtag is deprecated. For example, `ro` is preferred over deprecated `mo`.\n\n```\n> language('mo').preferred();\nSubtag\n```\n\n#### subtag.script() ####\n\nFor subtags of type 'language' or 'extlang', returns a `Subtag` object representing the language's default script. See [RFC 5646 section 3.1.9](http://tools.ietf.org/html/rfc5646#section-3.1.9) for a definition of 'Suppress-Script'.\n\n#### subtag.scope() ####\n\nReturns the subtag scope as a string, or `null` if the subtag has no scope.\n\nTip: if the subtag represents a macrolanguage, you can use `languages(macrolanguage)` to get a list of all the macrolanguage's individual languages.\n\n```\n> language('zh').scope();\n'macrolanguage'\n> language('nah').scope();\n'collection'\n```\n\n#### subtag.deprecated() ####\n\nReturns a date string reflecting the deprecation date if the subtag is deprecated, otherwise returns `null`.\n\n```\n> language('ja').deprecated();\n'2008-11-22'\n```\n\n#### subtag.added() ####\n\nReturns a date string reflecting the date the subtag was added to the registry.\n\n```\n> language('ja').added();\n'2005-10-16'\n```\n\n#### subtag.comments() ####\n\nReturns an array of comments, if any, otherwise returns an empty array.\n\n```\n> language('nmf').comments();\n['see ntx']\n```\n\n#### subtag.format() ####\n\nReturn the subtag code formatted according to the case conventions defined in [RFC 5646 section 2.1.1](http://tools.ietf.org/html/rfc5646#section-2.1.1).\n\n- language codes are made lowercase ('mn' for Mongolian)\n- script codes are made lowercase with the initial letter capitalized ('Cyrl' for Cyrillic)\n- country codes are capitalized ('MN' for Mongolia)\n\n### Tag ###\n\n#### tag.preferred() ####\n\nIf the tag is listed as 'deprecated' or 'redundant' it might have a preferred value. This method returns a `Tag` object if so.\n\n```\n> tags('zh-cmn-Hant').preferred();\nTag\n```\n\n#### tag.type() ####\n\nReturns `grandfathered` if the tag is grandfathered, `redundant` if the tag is redundant, and `tag` if neither. For a definition of grandfathered and redundant tags, see [RFC 5646 section 2.2.8](http://tools.ietf.org/html/rfc5646#section-2.2.8).\n\n#### tag.subtags() ####\n\nReturns an array of subtags making up the tag, as `Subtag` objects.\n\n#### tag.language(), tag.region(), tag.script() ####\n\nShortcuts for `tag.find('language')`, `tag.find('region')` and `tag.find('script')`.\n\n#### tag.find(type) ####\n\nFind a subtag of the given type from those making up the tag.\n\n#### tag.valid() ####\n\nReturns `true` if the tag is valid, `false` otherwise.\n\n#### tag.errors() ####\n\nReturns an array of `Error` objects if the tag is invalid. The `message` property of each is readable and helpful enough for UI output. The `code` property can be checked against the `Tag.ERR_*` constants. Each error will also have either a `subtag` or `tag` property with the code of the offending tag.\n\n#### tag.format() ####\n\nFormat a tag according to the case conventions defined in [RFC 5646 section 2.1.1](http://tools.ietf.org/html/rfc5646#section-2.1.1).\n\n```\n> tags('en-gb').format();\n'en-GB'\n```\n\n#### tag.deprecated() ####\n\nFor grandfathered or redundant tags, returns a date string reflecting the deprecation date if the tag is deprecated.\n\n```\n> tags('zh-cmn-Hant').deprecated();\n'2009-07-29'\n```\n\n#### tag.added() ####\n\nFor grandfathered or redundant tags, returns a date string reflecting the date the tag was added to the registry.\n\n#### tag.descriptions() ####\n\nReturns an array of tag descriptions for grandfathered or redundant tags, otherwise returns an empty array.\n\n## Resources ##\n\n- [Python version by the Flanders Heritage Agency](https://github.com/OnroerendErfgoed/language-tags)\n- [Language Subtag Lookup tool by Richard Ishida](http://rishida.net/utils/subtags/)\n- [W3C Internationalization Checker](http://validator.w3.org/i18n-checker/)\n- [RFC 5646](http://tools.ietf.org/html/rfc5646)\n\n## Credits and collaboration ##\n\nCopyright (c) 2013, [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia).\n\nThe software part of this project is licensed under an [MIT licence](http://mattcg.mit-license.org/).\n\nComments, feedback and suggestions are welcome. Please feel free to raise an issue or pull request. Enjoy.\n","_attachments":{},"homepage":"https://github.com/mattcg/language-tags","bugs":{"url":"https://github.com/mattcg/language-tags/issues"},"license":"MIT"}