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 - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"version": "1.1.0",
"version": "1.1.1",
"name": "average-rating",

@@ -4,0 +4,0 @@ "description": "Calculate average score and rating based on Wilson Score Equation",

@@ -5,5 +5,5 @@ # average-rating

[![NPM](https://badge.fury.io/js/average-rating.svg)](https://badge.fury.io/js/average-rating)
![Travis](https://travis-ci.org/ndaidong/average-rating.svg?branch=master)
[![Build Status](https://travis-ci.org/ndaidong/average-rating.svg?branch=master)](https://travis-ci.org/ndaidong/average-rating)
[![Coverage Status](https://coveralls.io/repos/github/ndaidong/average-rating/badge.svg?branch=master)](https://coveralls.io/github/ndaidong/average-rating?branch=master)
[![Dependency Status](https://www.versioneye.com/user/projects/57e8df1bbd6fa600512e3a65/badge.svg?style=flat)](https://www.versioneye.com/user/projects/57e8df1bbd6fa600512e3a65)
[![dependencies Status](https://david-dm.org/ndaidong/average-rating/status.svg)](https://david-dm.org/ndaidong/average-rating)
[![Known Vulnerabilities](https://snyk.io/test/npm/average-rating/badge.svg)](https://snyk.io/test/npm/average-rating)

@@ -32,2 +32,23 @@

# API reference
### .score(Number positive, Number negative)
Return a value from 0 to 1.
Used for the systems of Positive/Negative rating, such as the videos on YouTube, the answers on StackOverflow, etc. In which, each of item can be voted as good or bad, like or dislike or something like that.
### .rate(Array ratings)
Return a value from 0 to 1.
Used for the systems of 5 rating levels, such as the applications on Google Play store, the books on Amazon, etc. In which, each of item can be voted as one of value in the range of 1 to 5 stars.
### .average(Array ratings)
Return a value from 0 to 5.
Calculate normal average value for the systems of 5 rating levels.
## Test

@@ -34,0 +55,0 @@

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