@localedb/core · @localedb/cli
npm パッケージと CLI
LocaleDB を自分のコードで使えます。オフラインで動く型付きライブラリと、選んだデータをプロジェクトに書き出すコマンドラインツールです。
npm install @localedb/coreexample.ts
import { getCountry } from "@localedb/core";
const tr = getCountry("TR");
tr?.currency.symbol; // "₺"
tr?.numberFormat.decimalSeparator; // ","
tr?.dateTime.dateFormats.short; // "d.MM.y"
// or from the command line
// npx @localedb/cli get country TR