average-rating
Advanced tools
Comparing version 0.0.11 to 0.1.2
{ | ||
"version": "0.0.11", | ||
"version": "0.1.2", | ||
"name": "average-rating", | ||
@@ -18,6 +18,7 @@ "description": "Calculate average score and rating based on Wilson Score Equation", | ||
}, | ||
"dependencies": { | ||
"bellajs": "latest" | ||
"scripts": { | ||
"test": "mocha test" | ||
}, | ||
"devDependencies": { | ||
"bellajs": "latest", | ||
"mocha": "latest", | ||
@@ -24,0 +25,0 @@ "chai": "latest" |
# average-rating | ||
Calculate average and scoring based on Wilson Score Equation | ||
![Travis](https://travis-ci.org/ndaidong/average-rating.svg?branch=master) | ||
![Google app on Google Play](http://i.imgur.com/NgQX5OW.png) | ||
## Usage | ||
@@ -10,5 +14,15 @@ | ||
// from 1 to 5 stars | ||
let rating = [9524, 4158, 10177, 25971, 68669]; | ||
let score = Calculator.score(rating); // --> 0.79 | ||
let average = Calculator.average(rating); // --> 4.2 | ||
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](https://mochajs.org/) installed_ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
11450
0
13
240
28
3
4
1
- Removedbellajs@latest
- Removedbellajs@11.2.0(transitive)