2.5.0 • Published 2 years ago

percify v2.5.0

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

Percify is a simple library for generate percentages.

Installation

Use the package manager npm or yarn to install.

npm install percify

or

yarn add percify

Usage

const percentage = require("percify");

/**
 * returns "Percentage: 10%"
 * params type number
 */
console.log("Percentage: " + percentage(150, 1500) + "%");

/**
 * returns "Percentage: 10%"
 * params type string
 */
console.log("Percentage: " + percentage("150", "1500") + "%");

/**
 * Return formated value
 *
 */
const percent = percentage(150, 1500).format();
console.log(percent); // returns "10%"

Contributing

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

Please make sure to update tests as appropriate.

License

MIT 💙 Daniel Murilo Vaz

2.5.0

2 years ago

2.4.0

2 years ago

2.6.0-0

3 years ago

2.5.0-0

3 years ago

2.4.0-0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago