Install
$ pnpm install -D os-lang
$ yarn add -D os-lang
$ npm install -D os-lang
Usage
use import
import { osLang, osLangSync } from 'os-lang'
osLang()
osLangSync()
use require
const { osLang, osLangSync } = require('os-lang')
osLang()
osLangSync()
API reference
- Usage:
osLang(options)
& osLangSync(options)
- Parameters:
Param | Description | Type | Optional value | Required | Default value |
---|
spawn | get lang only from environment variables | boolean | - | true | - |
export interface OsLangOptions {
spawn: boolean
}
- simple use
import { osLang, osLangSync } from 'os-lang'
const lang = osLang()
Issues & Support
Please open an issue here.
License
MIT