Giter Club home page Giter Club logo

foramount's Introduction

ForAmount ₹$

ForAmount is a npm package which can be used to format and display amount according to your language set. Is more powerful when localizing your website, hence displaying cost according to the language and country selected.


How to use:

As a React Component


import Formatter from "foramount";

Example in react:

<Formatter amount="200000" currency="INR" locale="en-IN" />


In NodeJS


const formatter = require("foramount");

Example in NodeJS:

formatter({amount: "200", currency: "INR" locale: "en-IN" });


Props:


Props Values Description
amount 10000 Pass the amount to be formatted here
currency ISO 4217 code from https://en.wikipedia.org/wiki/ISO_4217#Active_codes
eg: INR, USD, IDR
If left blank, currency unit will not be displayed.
currencyDisplay eg: symbol, narrowSymbol, code, name will display currency unit for the amount set, default is code
locale eg: en-US, en-IN, hi-IN Is a combination of language code and country code, default is en-US

foramount's People

Contributors

dependabot[bot] avatar

Stargazers

 avatar Ananthakumar avatar ​Faizaan avatar

Watchers

Tushar Joshi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.