1.0.5 • Published 2 years ago

price-to-words-pl v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Price to Words - PL

This library converting a price value into a word representation with a currency.

Instalation

npm install price-to-words-pl

Usage

import PriceFormater from "price-to-words-pl"

const priceFormater = new PriceFormater()

priceFormater.convert(12.54);
//dwanaście złotych i pięćdziesiąt cztery grosze

priceFormater.format = {myFormat: 'zl-number zl and gr-words gr-full'}
priceFormater.convert(12.54);
//12 zł i pięćdziesiąt cztery grosze

Formats

import {CONVERTING_FORMATS} from "price-to-words-pl"
// definition
const CONVERTING_FORMATS = {
    typeA: 'zl-words zl-full and gr-words gr-full', //sto dwadzieścia pięć złotych pięćdziesiąt groszy
    typeB: 'zl-words zl gr-words gr',               //sto dwadzieścia pięć zł pięćdziesiąt gr
    typeC: 'zl-words zl gr-short',                  //sto dwadzieścia pięć zł 50/100
    typeD: 'zl-number zl gr-number gr'              //125 zł 50 gr
}

default: typeA.

Build:

  • Webpack 5
  • Babel 7
  • Jest 27
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago