API Reference
Complete API documentation for @glotblocks/glost-common.
Modules
- Language Codes - Convert and validate language codes
- BCP-47 - Parse and build BCP-47 tags
- Proficiency - Work with proficiency levels
- Conversions - Language-specific proficiency conversions
- Constants - Data and schemas
Quick Examples
import {
toISO639_3,
parseBCP47,
cefrToNumeric,
jlptToNumeric
} from '@glotblocks/glost-common'
// Language codes
toISO639_3("en") // "eng"
toISO639_3("zh-Hans") // "zho"
// BCP-47 parsing
parseBCP47("zh-Hans-CN")
// { language: "zh", script: "Hans", region: "CN" }
// Proficiency
cefrToNumeric("B1") // 3
jlptToNumeric("N3") // 3Last updated on