iso-15924 v3.2.0
iso-15924
ISO 15924 codes.
Contents
What is this?
This is the data of ISO 15924.
When should I use this?
ISO 15924 represents scripts (such as Latin, Georgian).
These scripts are often seen in BCP 47 language codes: sr-Cyrl (sr is ISO
639-1 for Serbian, Cyrl is ISO 15924 for Cyrillic).
This package is useful when you’re working with languages.
Install
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install iso-15924In Deno with esm.sh:
import {iso15924} from 'https://esm.sh/iso-15924@3'In browsers with esm.sh:
<script type="module">
  import {iso15924} from 'https://esm.sh/iso-15924@3?bundle'
</script>Use
import {iso15924} from 'iso-15924'
console.log(iso15924.length) // => 210
console.log(iso15924.slice(0, 3))Yields:
[
  {code: 'Adlm', name: 'Adlam', numeric: '166', pva: 'Adlam', date: '2016-12-05'},
  {code: 'Afak', name: 'Afaka', numeric: '439', date: '2010-12-21'},
  {code: 'Aghb', name: 'Caucasian Albanian', numeric: '239', pva: 'Caucasian_Albanian', date: '2014-11-15'}
]API
This package exports the identifier iso15924.
There is no default export.
iso15924
List of scripts (Array<Script>).
Script
ISO 15924 script info (Object):
- name(- string) — script name
- code(- string) — four character ISO 15924 code
- numeric(- string) — three character ISO 15924 code
- pva(- string?) — property value alias
- date(- string) — date of addition (e.g.,- '2016-12-05')
Types
This package is fully typed with TypeScript.
It exports the additional type Script.
Compatibility
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
Security
This package is safe.
Related
- wooorm/bcp-47— parse and serialize BCP 47 language tags
- wooorm/bcp-47-match— match BCP 47 language tags with language ranges per RFC 4647
- wooorm/bcp-47-normalize— normalize, canonicalize, and format BCP 47 tags
- wooorm/iso-3166— ISO 3166 codes
- wooorm/iso-639-3— ISO 639-3 codes
- wooorm/iso-639-2— ISO 639-2 codes
- wooorm/un-m49— UN M49 codes
Contribute
Yes please! See How to Contribute to Open Source.