Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 787 Bytes

Readme.md

File metadata and controls

34 lines (22 loc) · 787 Bytes

format-naira

format-naira is a package that format number values to naira currency

Installation

Use the package manager npm to install format-naira.

npm install format-naira

Usage

const formatNaira = require(format - naira); //commmonJS import
//
import formatNaira from "format-to-naira"; //es6 imports

const nairaValue = formatNaira(1000); 
console.log(nairaValue) //₦1,000

//you can also format more than one value it will return a sum in naira 
const total = formatNaira(2000, 3000); 
console.log(total) //₦5,000

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT