Comparing version 2.0.0 to 3.0.0
{ | ||
"name": "iso-639-2", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "ISO-639-2 codes in an accessible format", | ||
@@ -19,4 +19,4 @@ "license": "MIT", | ||
"funding": { | ||
"type": "github", | ||
"url": "https://github.com/sponsors/wooorm" | ||
"type": "github", | ||
"url": "https://github.com/sponsors/wooorm" | ||
}, | ||
@@ -27,31 +27,46 @@ "author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)", | ||
], | ||
"main": "index.json", | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"2b-to-1.json", | ||
"2b-to-2t.json", | ||
"2t-to-1.json", | ||
"2t-to-2b.json", | ||
"index.json" | ||
"2.d.ts", | ||
"2.js", | ||
"2b-to-1.d.ts", | ||
"2b-to-1.js", | ||
"2b-to-2t.d.ts", | ||
"2b-to-2t.js", | ||
"2t-to-1.d.ts", | ||
"2t-to-1.js", | ||
"2t-to-2b.d.ts", | ||
"2t-to-2b.js", | ||
"index.d.ts", | ||
"index.js" | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"bail": "^1.0.0", | ||
"browserify": "^16.0.0", | ||
"@types/concat-stream": "^1.0.0", | ||
"@types/d3-dsv": "^2.0.0", | ||
"@types/node": "^14.0.0", | ||
"@types/tape": "^4.0.0", | ||
"bail": "^2.0.0", | ||
"c8": "^7.0.0", | ||
"concat-stream": "^2.0.0", | ||
"d3-dsv": "^1.0.0", | ||
"prettier": "^1.0.0", | ||
"remark-cli": "^7.0.0", | ||
"remark-preset-wooorm": "^6.0.0", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.0.0", | ||
"xo": "^0.25.0" | ||
"d3-dsv": "^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", | ||
"xo": "^0.38.0" | ||
}, | ||
"scripts": { | ||
"prepack": "npm run build && npm run format", | ||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage", | ||
"generate": "node build", | ||
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix", | ||
"build-bundle": "browserify index.json -s iso6392 -o iso-639-2.js", | ||
"build-mangle": "browserify index.json -s iso6392 -p tinyify -o iso-639-2.min.js", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
"test-api": "node test", | ||
"test": "npm run generate && npm run format && npm run build && npm run test-api" | ||
"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" | ||
}, | ||
@@ -68,6 +83,7 @@ "prettier": { | ||
"prettier": true, | ||
"esnext": false, | ||
"ignores": [ | ||
"iso-639-2.js" | ||
] | ||
"rules": { | ||
"import/no-mutable-exports": "off", | ||
"no-var": "off", | ||
"prefer-arrow-callback": "off" | ||
} | ||
}, | ||
@@ -78,3 +94,8 @@ "remarkConfig": { | ||
] | ||
}, | ||
"typeCoverage": { | ||
"atLeast": 100, | ||
"detail": true, | ||
"strict": true | ||
} | ||
} |
# iso-639-2 | ||
[![Build][build-badge]][build] | ||
[![Coverage][coverage-badge]][coverage] | ||
[![Downloads][downloads-badge]][downloads] | ||
@@ -11,13 +12,7 @@ [![Size][size-badge]][size] | ||
* [`iso-639-2/2b-to-1`][2b-to-1] | ||
— Map bibliographic ISO 639-2 codes to ISO 639-1 codes | ||
* [`iso-639-2/2b-to-2t`][2b-to-2t] | ||
— Map bibliographic ISO 639-2 codes to terminologic ISO 639-2 codes | ||
* [`iso-639-2/2t-to-1`][2t-to-1] | ||
— Map terminologic ISO 639-2 codes to ISO 639-1 codes | ||
* [`iso-639-2/2t-to-2b`][2t-to-2b] | ||
— Map terminologic ISO 639-2 codes to bibliographic ISO 639-2 codes | ||
## Install | ||
This package is ESM only: Node 12+ is needed to use it and it must be `import`ed | ||
instead of `require`d. | ||
[npm][]: | ||
@@ -32,3 +27,3 @@ | ||
```js | ||
var iso6392 = require('iso-639-2') | ||
import {iso6392} from 'iso-639-2' | ||
@@ -77,2 +72,6 @@ iso6392.slice(120, 150) | ||
This package exports the following identifiers: `iso6392`, `iso6392BTo1`, | ||
`iso6392BTo2T`, `iso6392TTo1`, `iso6392TTo2B`. | ||
There is no default export. | ||
### `iso6392` | ||
@@ -85,10 +84,44 @@ | ||
* `iso6392B` (`string`) — Bibliographic code | ||
* `iso6392T` (`string?`) — Terminologic code | ||
* `iso6392T` (`string?`) — Terminologic code (missing when B and T are the | ||
same) | ||
* `iso6391` (`string?`) — ISO 639-1 code | ||
* `name` (`string`) — Language name | ||
### `iso6392BTo1` | ||
`Object.<string, string>` — ISO 639-2 Bibliographic (`dut`) to ISO 639-1 (`nl`) | ||
### `iso6392BTo2T` | ||
`Object.<string, string>` — ISO 639-2 Bibliographic (`dut`) to ISO 639-2 | ||
Terminologic (`nld`). | ||
Missing when B & T are the same. | ||
### `iso6392TTo1` | ||
`Object.<string, string>` — ISO 639-2 Terminologic (`nld`) to ISO 639-1 (`nl`) | ||
Missing when B & T are the same. | ||
### `iso6392TTo2B` | ||
`Object.<string, string>` — ISO 639-2 Terminologic (`nld`) to ISO 639-2 | ||
Bibliographic (`dut`). | ||
Missing when B & T are the same. | ||
## Related | ||
* [`bcp-47`](https://github.com/wooorm/bcp-47) | ||
— Parse and serialize BCP 47 language tags | ||
* [`bcp-47-match`](https://github.com/wooorm/bcp-47-match) | ||
— Match BCP 47 language tags with language ranges per RFC 4647 | ||
* [`bcp-47-normalize`](https://github.com/wooorm/bcp-47-normalize) | ||
— Normalize, canonicalize, and format BCP 47 tags | ||
* [`iso-3166`](https://github.com/wooorm/iso-3166) | ||
— ISO 3166 codes | ||
* [`iso-639-3`](https://github.com/wooorm/iso-639-3) | ||
— ISO 639-3 codes in an accessible format | ||
— ISO 639-3 codes | ||
* [`iso-15924`](https://github.com/wooorm/iso-15924) | ||
— ISO 15924 codes | ||
* [`un-m49`](https://github.com/wooorm/un-m49) | ||
— UN M49 codes | ||
@@ -101,6 +134,10 @@ ## License | ||
[build-badge]: https://img.shields.io/travis/wooorm/iso-639-2.svg | ||
[build-badge]: https://github.com/wooorm/iso-639-2/workflows/main/badge.svg | ||
[build]: https://travis-ci.org/wooorm/iso-639-2 | ||
[build]: https://github.com/wooorm/iso-639-2/actions | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/iso-639-2.svg | ||
[coverage]: https://codecov.io/github/wooorm/iso-639-2 | ||
[downloads-badge]: https://img.shields.io/npm/dm/iso-639-2.svg | ||
@@ -121,9 +158,1 @@ | ||
[source]: https://www.loc.gov/standards/iso639-2/php/code_list.php | ||
[2b-to-1]: 2b-to-1.json | ||
[2b-to-2t]: 2b-to-2t.json | ||
[2t-to-1]: 2t-to-1.json | ||
[2t-to-2b]: 2t-to-2b.json |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
47504
15
2689
153
Yes
16
1