Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

average-rating

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

average-rating

Calculate average score and rating based on Wilson Score Equation

  • 0.1.12
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

average-rating

Calculate average and scoring based on Wilson Score Equation

Google app on Google Play

Usage

import Calculator from 'average-rating';

// from 1 to 5 stars
let rating = [134055, 57472, 143135, 365957, 1448459];
let score = Calculator.score(rating); // --> 0.84
let average = Calculator.average(rating); // --> 4.4

Test

npm install
mocha

* Ensure that you have mocha installed

FAQs

Package last updated on 08 Nov 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc