average-rating
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10208
65