3.2.0 • Published 6 months ago

iso-15924 v3.2.0

Weekly downloads
200
License
MIT
Repository
github
Last release
6 months ago

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

  • 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

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

3.2.0

6 months ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

3 years ago

2.4.0

4 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

6 years ago

2.0.1

7 years ago

2.0.0

8 years ago

1.0.0

9 years ago