Socket
Socket
Sign inDemoInstall

5rate-star

Package Overview
Dependencies
257
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    5rate-star

Simple library for 5-star rating.


Version published
Weekly downloads
15
increased by1400%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

:package: 5rate-star

Simple library for 5-star rating.

codecov Node.js Package GitHub pull requests GitHub Downloads GitHub Total Downloads GitHub release

Report Bug Request Feature

Installation

Install with yarn or npm: yarn or npm:

# yarn
yarn add 5rate-star
# npm
npm i 5rate-star --save

Import the lib with es6 or cjs:

// es6
import { Rating, SumRating } from '5rate-star';

const rating = new Rating();

const { classificationRating } = new SumRating([4, 5]);

const result = rating.calculate(classificationRating);

console.log(result); // 4.6
// cjs
const { Rating, SumRating } = require("5rate-star")

const rating = new Rating();

const { classificationRating } = new SumRating([4, 5]);

const result = rating.calculate(classificationRating);

console.log(result); // 4.6

Usage examples:

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Open in Gitpod

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.

Keywords

FAQs

Last updated on 10 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc