:package: 5rate-star
Simple library for 5-star rating.
Report Bug
Request Feature
Installation
Install with yarn or npm: yarn
or npm
:
yarn add 5rate-star
npm i 5rate-star --save
Import the lib with es6 or cjs:
import { Rating, SumRating } from '5rate-star';
const rating = new Rating();
const { classificationRating } = new SumRating([4, 5]);
const result = rating.calculate(classificationRating);
console.log(result);
const { Rating, SumRating } = require("5rate-star")
const rating = new Rating();
const { classificationRating } = new SumRating([4, 5]);
const result = rating.calculate(classificationRating);
console.log(result);
Usage examples:
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)
Show your support
Give a ⭐️ if this project helped you!
Or buy me a coffee 🙌🏾
📝 License
Copyright © 2022 Hebert F Barros.
This project is MIT licensed.