{"_id":"bcp-47-normalize","_rev":"3635691","name":"bcp-47-normalize","description":"Normalize, canonicalize, and format BCP 47 tags","dist-tags":{"latest":"2.3.0"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"time":{"modified":"2024-10-21T06:06:08.000Z","created":"2020-02-23T18:49:08.647Z","2.3.0":"2023-07-17T16:45:44.795Z","2.2.0":"2022-11-23T13:21:36.895Z","2.1.0":"2022-04-12T10:17:19.104Z","2.0.2":"2021-11-08T11:02:40.129Z","2.0.1":"2021-05-09T18:38:27.837Z","2.0.0":"2021-05-09T13:24:48.925Z","1.1.1":"2020-10-26T11:41:23.297Z","1.1.0":"2020-07-24T13:09:57.414Z","1.0.0":"2020-02-23T18:49:08.647Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"versions":{"2.3.0":{"name":"bcp-47-normalize","version":"2.3.0","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"bcp-47":"^2.0.0","bcp-47-match":"^2.0.0"},"devDependencies":{"@types/node":"^20.0.0","@types/node-fetch":"^3.0.0","@types/xast":"^2.0.0","c8":"^8.0.0","cldr-core":"^43.0.0","node-fetch":"^3.0.0","prettier":"^3.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","unist-util-visit":"^5.0.0","xast-util-from-xml":"^3.0.0","xo":"^0.55.0"},"scripts":{"prepack":"npm run generate && npm run build && npm run format","generate":"node --conditions development build.js","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --log-level warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run generate && npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"9d544fe50bd229c1179475ba25a0de7b01339dd7","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@2.3.0","_nodeVersion":"20.0.0","_npmVersion":"9.7.2","dist":{"shasum":"00f7de9dfdd0f6901c048083be5ac60903bf4f7a","size":66601,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-2.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-2.3.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_2.3.0_1689612344540_0.41810939864610286"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-07-17T16:45:44.795Z","publish_time":1689612344795,"_source_registry_name":"default","_cnpm_publish_time":1689612344795},"2.2.0":{"name":"bcp-47-normalize","version":"2.2.0","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"bcp-47":"^2.0.0","bcp-47-match":"^2.0.0"},"devDependencies":{"@types/node":"^18.0.0","@types/node-fetch":"^3.0.0","@types/xast":"^1.0.0","c8":"^7.0.0","cldr-core":"^42.0.0","node-fetch":"^3.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-visit":"^4.0.0","xast-util-from-xml":"^2.0.0","xo":"^0.53.0"},"scripts":{"prepack":"npm run generate && npm run build && npm run format","generate":"node --conditions development build.js","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run generate && npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"cc8009b8f9e60c0f1744bc7eca7460cc0c707cb7","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@2.2.0","_nodeVersion":"19.0.0","_npmVersion":"8.19.2","dist":{"shasum":"acc0c3d377feac5cdc6c2e58a9271f8e0661ab26","size":25937,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-2.2.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_2.2.0_1669209696742_0.887054838206452"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-23T13:41:53.616Z","publish_time":1669209696895,"_cnpm_publish_time":1669209696895},"2.1.0":{"name":"bcp-47-normalize","version":"2.1.0","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"bcp-47":"^2.0.0","bcp-47-match":"^2.0.0"},"devDependencies":{"@types/node-fetch":"^3.0.0","@types/tape":"^4.0.0","@types/xast":"^1.0.0","c8":"^7.0.0","cldr-core":"^41.0.0","node-fetch":"^3.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-visit":"^4.0.0","xast-util-from-xml":"^2.0.0","xo":"^0.48.0"},"scripts":{"generate":"node build.js","prepublishOnly":"npm run build && npm run format","build":"rimraf \"lib/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api","test":"npm run generate && npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"5a6b44547af23db06d1f87e2b2d7cdc87871de71","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@2.1.0","_nodeVersion":"17.4.0","_npmVersion":"8.5.5","dist":{"shasum":"56541b36e1ea55380ec8db35129fcce51b81c806","size":25717,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-2.1.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_2.1.0_1649758638954_0.1466285849498392"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-12T15:33:14.944Z","publish_time":1649758639104,"_cnpm_publish_time":1649758639104},"2.0.2":{"name":"bcp-47-normalize","version":"2.0.2","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"bcp-47":"^2.0.0","bcp-47-match":"^2.0.0"},"devDependencies":{"@types/node-fetch":"^3.0.0","@types/tape":"^4.0.0","@types/xast":"^1.0.0","c8":"^7.0.0","cldr-core":"^40.0.0","node-fetch":"^3.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-visit":"^4.0.0","xast-util-from-xml":"^2.0.0","xo":"^0.46.0"},"scripts":{"generate":"node build.js","prepublishOnly":"npm run build && npm run format","build":"rimraf \"lib/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api","test":"npm run generate && npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"eb3b2f6f8a6963665c0c982150191344a07381dc","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@2.0.2","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"c888239917918f22cb548f1059b1d3cd3cc265b0","size":25630,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-2.0.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_2.0.2_1636369359978_0.03413110374103545"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T11:20:06.600Z","publish_time":1636369360129,"_cnpm_publish_time":1636369360129},"2.0.1":{"name":"bcp-47-normalize","version":"2.0.1","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"bcp-47":"^2.0.0","bcp-47-match":"^2.0.0"},"devDependencies":{"@types/node-fetch":"^2.0.0","@types/tape":"^4.0.0","@types/xast":"^1.0.0","c8":"^7.0.0","cldr-core":"^39.0.0","node-fetch":"^2.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-visit":"^3.0.0","xast-util-from-xml":"^2.0.0","xo":"^0.40.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"{lib/**,}*.d.ts\" && tsc && type-coverage","generate":"node build","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"d6bd5e764a25a6f0e9ed51146ef0a7e689a5cd2e","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@2.0.1","_nodeVersion":"15.11.0","_npmVersion":"7.11.1","dist":{"shasum":"13b06884d096cd2729dbd966a839523b706787a5","size":29702,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-2.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_2.0.1_1620585507629_0.3396528826282508"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T11:20:05.263Z","publish_time":1620585507837,"_cnpm_publish_time":1620585507837},"2.0.0":{"name":"bcp-47-normalize","version":"2.0.0","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"bcp-47":"^2.0.0","bcp-47-match":"^2.0.0","cldr-core":"^39.0.0"},"devDependencies":{"@types/node-fetch":"^2.0.0","@types/tape":"^4.0.0","@types/xast":"^1.0.0","c8":"^7.0.0","node-fetch":"^2.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-visit":"^3.0.0","xast-util-from-xml":"^2.0.0","xo":"^0.40.0"},"scripts":{"prepack":"npm run build && npm run format","build":"rimraf \"{lib/**,}*.d.ts\" && tsc && type-coverage","generate":"node build","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"rules":{"no-var":"off","prefer-arrow-callback":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true},"gitHead":"a123d799f22745244da48eb70524acaf852f8152","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@2.0.0","_nodeVersion":"15.11.0","_npmVersion":"7.11.1","dist":{"shasum":"3d60edcc1c9552237711d165c71cda3365c049d1","size":29702,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-2.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_2.0.0_1620566688800_0.47533590550683424"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T11:20:03.476Z","publish_time":1620566688925,"_cnpm_publish_time":1620566688925},"1.1.1":{"name":"bcp-47-normalize","version":"1.1.1","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"bcp-47":"^1.0.0","bcp-47-match":"^1.0.0"},"devDependencies":{"node-fetch":"^2.0.0","nyc":"^15.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","tape":"^5.0.0","unist-util-visit":"^2.0.0","xast-util-from-xml":"^1.0.0","xo":"^0.34.0"},"scripts":{"format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/explicit-length-check":"off","unicorn/prefer-includes":"off","unicorn/prefer-number-properties":"off","unicorn/prefer-set-has":"off"}},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"25833fd8de27bfe8f71489866585371668b6ed1d","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@1.1.1","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"shasum":"d2c76218d132f223c44e4a06a7224be3030f8ec3","size":11563,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-1.1.1.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_1.1.1_1603712483151_0.04156322049640848"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T11:20:02.107Z","publish_time":1603712483297,"_cnpm_publish_time":1603712483297},"1.1.0":{"name":"bcp-47-normalize","version":"1.1.0","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"bcp-47":"^1.0.0","bcp-47-match":"^1.0.0"},"devDependencies":{"node-fetch":"^2.0.0","nyc":"^15.0.0","prettier":"^2.0.0","remark-cli":"^8.0.0","remark-preset-wooorm":"^7.0.0","tape":"^5.0.0","unist-util-visit":"^2.0.0","xast-util-from-xml":"^1.0.0","xo":"^0.32.0"},"scripts":{"format":"remark . -qfo && prettier --write . && xo --fix","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/prefer-includes":"off","unicorn/prefer-number-properties":"off","unicorn/prefer-set-has":"off"}},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"66d6a4c102d1395a7636fac7123286a91c8818ae","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@1.1.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.5","dist":{"shasum":"01490428d33ac6c2b31a8226876b8a84343d6f56","size":11741,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-1.1.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_1.1.0_1595596197275_0.0035455680865676964"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T11:20:01.799Z","publish_time":1595596197414,"_cnpm_publish_time":1595596197414},"1.0.0":{"name":"bcp-47-normalize","version":"1.0.0","description":"Normalize, canonicalize, and format BCP 47 tags","license":"MIT","keywords":["bcp","47","bcp47","bcp-47","language","region","script","tag","subtag","format","pretty","normal","canonical"],"repository":{"type":"git","url":"git+https://github.com/wooorm/bcp-47-normalize.git"},"bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"bcp-47":"^1.0.0","bcp-47-match":"^1.0.0"},"devDependencies":{"node-fetch":"^2.0.0","nyc":"^15.0.0","prettier":"^1.0.0","remark-cli":"^7.0.0","remark-preset-wooorm":"^6.0.0","tape":"^4.0.0","unist-util-visit":"^2.0.0","xast-util-from-xml":"^1.0.0","xo":"^0.26.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/prefer-includes":"off"}},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"6152d4c12072f3ce4426ea3936b583c936f92d43","homepage":"https://github.com/wooorm/bcp-47-normalize#readme","_id":"bcp-47-normalize@1.0.0","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"shasum":"c10e0b418ea0122f4e0a45a6a940624218b70f0e","size":11476,"noattachment":false,"key":"/bcp-47-normalize/-/bcp-47-normalize-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bcp-47-normalize/download/bcp-47-normalize-1.0.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bcp-47-normalize_1.0.0_1582483748501_0.9219596344623702"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T11:20:00.817Z","publish_time":1582483748647,"_cnpm_publish_time":1582483748647}},"readme":"# bcp-47-normalize\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nNormalize, canonicalize, and format [BCP 47][spec] tags.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`bcp47Normalize(tag[, options])`](#bcp47normalizetag-options)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package takes BCP 47 tags and makes them uniform.\nIt removes unneeded info (`en-us` -> `en`) and replaces deprecated,\noverlong, and otherwise unpreferred values with preferred values\n(`en-bu` -> `en-MM`).\nIt works by applying [Unicode CLDR suggestions][alias].\n\n## When should I use this?\n\nYou can use this package when dealing with user-provided language tags and want\nto normalize and clean them.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install bcp-47-normalize\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {bcp47Normalize} from 'https://esm.sh/bcp-47-normalize@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {bcp47Normalize} from 'https://esm.sh/bcp-47-normalize@2?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {bcp47Normalize} from 'bcp-47-normalize'\n\nconst tags = [\n  'de-de-1901',\n  'en-gb',\n  'en-us',\n  'en-bu',\n  'hy-arevmda',\n  'nld-nl',\n  'no-nyn',\n  'pt-br',\n  'pt-pt',\n  'zh-hans-cn'\n]\n\ntags.forEach((tag) => console.log('%s -> %s', tag, bcp47Normalize(tag)))\n```\n\nYields:\n\n```txt\nde-de-1901 -> de-1901\nen-gb -> en-GB\nen-us -> en\nen-bu -> en-MM\nhy-arevmda -> hyw\nnld-nl -> nl\nno-nyn -> nn\npt-br -> pt\npt-pt -> pt-PT\nzh-hans-cn -> zh\n```\n\n## API\n\nThis package exports the identifier `bcp47Normalize`.\nThere is no default export.\n\n### `bcp47Normalize(tag[, options])`\n\nNormalize the given BCP 47 tag according to [Unicode CLDR suggestions][alias].\n\n###### Parameters\n\n*   `tag` (`string`)\n    — BCP 47 tag\n*   `options.forgiving` (`boolean`, default: `false`)\n    — passed to `bcp-47` as [`options.forgiving`][forgiving]\n*   `options.warning` (`Function?`, default: `undefined`)\n    — passed to `bcp-47` as [`options.warning`][warning]\n\n    One additional warning is given:\n\n    | code | reason                                                     |\n    | :--- | :--------------------------------------------------------- |\n    | 7    | Deprecated region `CURRENT`, expected one of `SUGGESTIONS` |\n\n    This warning is only given if the region cannot be automatically fixed (when\n    regions split into multiple regions).\n\n###### Returns\n\nNormal, canonical, and pretty [BCP 47][spec] tag (`string`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types `Options` and `Warning`.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n*   [`wooorm/bcp-47`](https://github.com/wooorm/bcp-47)\n    — parse and stringify BCP 47 language tags\n*   [`wooorm/bcp-47-match`](https://github.com/wooorm/bcp-47-match)\n    — match BCP 47 language tags with language ranges per RFC 4647\n*   [`wooorm/iso-3166`](https://github.com/wooorm/iso-3166)\n    — ISO 3166 codes\n*   [`wooorm/iso-639-2`](https://github.com/wooorm/iso-639-2)\n    — ISO 639-2 codes\n*   [`wooorm/iso-639-3`](https://github.com/wooorm/iso-639-3)\n    — ISO 639-3 codes\n*   [`wooorm/iso-15924`](https://github.com/wooorm/iso-15924)\n    — ISO 15924 codes\n*   [`wooorm/un-m49`](https://github.com/wooorm/un-m49)\n    — UN M49 codes\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/bcp-47-normalize/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/bcp-47-normalize/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/bcp-47-normalize.svg\n\n[coverage]: https://codecov.io/github/wooorm/bcp-47-normalize\n\n[downloads-badge]: https://img.shields.io/npm/dm/bcp-47-normalize.svg\n\n[downloads]: https://www.npmjs.com/package/bcp-47-normalize\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/bcp-47-normalize.svg\n\n[size]: https://bundlephobia.com/result?p=bcp-47-normalize\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esmsh]: https://esm.sh\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[spec]: https://tools.ietf.org/rfc/bcp/bcp47.html\n\n[alias]: https://github.com/unicode-org/cldr/blob/142b327/common/supplemental/supplementalMetadata.xml#L32\n\n[forgiving]: https://github.com/wooorm/bcp-47#optionsforgiving\n\n[warning]: https://github.com/wooorm/bcp-47#optionswarning\n","_attachments":{},"homepage":"https://github.com/wooorm/bcp-47-normalize#readme","bugs":{"url":"https://github.com/wooorm/bcp-47-normalize/issues"},"license":"MIT"}