
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@matsukky/number
Advanced tools
Lightweight, dependency-free library for converting numbers to words in multiple languages
A minimalist library that converts numbers to their word representation in various languages. Zero dependencies, tree-shakeable, and type-safe.
npm install @matsukky/number
# or
yarn add @matsukky/number
# or
bun add @matsukky/number
import convertNumberToWords from '@matsukky/number';
console.log(convertNumberToWords(42)); // "forty-two"
console.log(convertNumberToWords(100)); // "one hundred"
console.log(convertNumberToWords(1337)); // "one thousand three hundred thirty-seven"
console.log(convertNumberToWords(-42)); // "minus forty-two"
import { locale, convertNumberToWords } from '@matsukky/number';
// Load French locale
await locale('fr', true); // if the languages
console.log(convertNumberToWords(42)); // "quarante-deux"
console.log(convertNumberToWords(100)); // "cent"
// OR
import { locale, convertNumberToWords } from '@matsukky/number';
import '@matsukky/number/locale/es'
locale('es')
console.log(convertNumberToWords(42)); // "cuarenta-dos"
console.log(convertNumberToWords(100)); // "cien"
You can use your own language by using the code custom.
import { locale, convertNumberToWords, Types } from '@matsukky/number';
const CustomLang = {
code: 'custom',
ones: ["", "uno", "dyo", "tri", "quatro", "penta", "hexa", "septa", "okto", "nova"],
teens: ["dizan", "dizan-uno", "dizan-dyo", "dizan-tri", "dizan-quatro", "dizan-penta", "dizan-hexa", "dizan-septa", "dizan-okto", "dizan-nova"],
tens: ["", "", "dizo", "trizo", "quarzo", "pentzo", "hexzo", "septzo", "okzo", "novzo"],
thousands: ["", "kilo", "mega", "giga"],
hundred: "hundo",
zero: "nullo",
minus: "meno",
} as Types.LanguageData;
locale(CustomLang, true)
console.log(convertNumberToWords(42)); // "quarzo-dyo"
console.log(convertNumberToWords(100)); // "hundo"
convertNumberToWords(
num: number,
options?: {
capitalize?: boolean;
language?: AvalaibleLanguage;
}
): string
LoadedLanguages(): string[]
locale(
language: AvalaibleLanguage | LanguageData,
dynamicImport?: boolean
): Promise<void>
Each language implementation includes:
FAQs
Easy return number in a string, in multiple languages
We found that @matsukky/number demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.