Home

Awesome

iso-15924

Build Coverage Downloads Size

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-15924

In 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):

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

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

<!-- Definition -->