price-text-format

1.0.2 • Public • Published

price-text-format

Use price-text-format if you want to convert you price in your app for good looking.



install

npm

npm install price-text-format

yarn

yarn add price-text-format




usage

import React from "react;
import PriceFormat from "price-text-format";


const App = () => {
    return (
        <div>
            <h1>{PriceFormat(100000)}</h1>
        </div>
    )
}

// output =  "100.000"

penny

Pass the "true" parameter after price for the showing penny.

import React from "react;
import PriceFormat from "price-text-format";


const App = () => {
    return (
        <div>
            <h1>{PriceFormat(100000, true)}</h1>
        </div>
    )
}

// output =  "1.000.00"

Readme

Keywords

Package Sidebar

Install

npm i price-text-format

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

1.83 kB

Total Files

3

Last publish

Collaborators

  • muhammeddeniz