speakers
Speaker count for 450+ languages.
Contents
- What is this?
- When should I use this?
- Install
- Use
- API
- Types
- Compatibility
- Security
- Related
- Contribute
- License
What is this?
This package provides speaker counts for many languages. Painstakingly crawled by hand from OHCHR.
👉 Note: the numbers are (in some cases, very) rough estimates or out-of-date.
When should I use this?
You can use this package if you want to get a (comparative) estimate of how many folks speak a certain language.
Install
This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:
npm install speakers
In Deno with Skypack:
import {speakers} from 'https://cdn.skypack.dev/speakers@2?dts'
In browsers with Skypack:
<script type="module">
import {speakers} from 'https://cdn.skypack.dev/speakers@2?min'
</script>
Use
import {speakers} from 'speakers'
console.log(speakers.eng) // => 322000000
console.log(speakers.jpn) // => 125000000
console.log(speakers.por) // => 182000000
console.log(speakers.cmn) // => 885000000
API
This package exports the following identifiers: speakers
.
There is no default export.
speakers
Map of ISO 639-3 codes to speaker counts (number
).
Types
This package is fully typed with TypeScript.
Compatibility
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, and 16.0+. It also works in Deno and modern browsers.
Security
This package is safe.
Related
-
wooorm/bcp-47
— parse and stringify BCP 47 language tags -
wooorm/bcp-47-match
— match BCP 47 language tags with language ranges per RFC 4647 -
wooorm/iso-639-2
— ISO 639-2 codes -
wooorm/iso-639-3
— ISO 639-3 codes -
wooorm/iso-15924
— ISO 15924 codes -
wooorm/un-m49
— UN M49 codes
Contribute
Yes please! See How to Contribute to Open Source.