Package Exports
- number-to-georgian-text
- number-to-georgian-text/dist/index.js
- number-to-georgian-text/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (number-to-georgian-text) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
number-to-georgian-text
Convert numbers into Georgian words
Installation
NPM
npm install number-to-georgian-text --saveYarn
yarn add number-to-georgian-textUsage
To Text
import { numberToText } from 'number-to-georgian-text';
console.log(numberToText(1700055));
// ერთი მილიონ შვიდასი ათას ორმოცდათხუთმეტი
console.log(numberToText("1700055"));
// ერთი მილიონ შვიდასი ათას ორმოცდათხუთმეტი
console.log(numberToText(1001001, {leadingOne: true}));
// ერთი მილიონ ერთი ათას ერთი
console.log(numberToText(1001001, {leadingOne: false}));
// მილიონ ათას ერთი
console.log(numberToText(100.01));
// ასი მთელი ერთი მეასედი
console.log(numberToText(100.01, {decimalPointSeparator: ','}));
// ასი მთელი, ერთი მეასედი
console.log(numberToText(100.01, {decimalPointSeparator: ' და'}));
// ასი მთელი და ერთი მეასედიTo Ordinal
import { numberToOrdinal } from 'number-to-georgian-text';
console.log(numberToOrdinal(1));
// 1-ელი
console.log(numberToOrdinal(2));
// მე-2
console.log(numberToOrdinal(1005));
// 1005-ეTo Ordinal Text
import { numberToOrdinalText } from 'number-to-georgian-text';
console.log(numberToOrdinalText(1));
// პირველი
console.log(numberToOrdinalText(2));
// მეორე
console.log(numberToOrdinalText(1005));
// ათას მეხუთეOptions
type Options = {
leadingOne?: boolean; // default: true
decimalPointSeparator?: string; // default: ''
}Tests
npm testLicense
MIT