-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V2
- Loading branch information
Showing
15 changed files
with
3,791 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
extends: ['helmut'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
.idea | ||
coverage | ||
node_modules | ||
test-results.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
before_install: npm install -g grunt-cli | ||
install: npm install | ||
- '8' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
# Wilson Score Interval [![Build Status](https://secure.travis-ci.org/msn0/wilson-score-interval.png?branch=master)](http://travis-ci.org/msn0/wilson-score-interval) | ||
|
||
Simple implementation of [Wilson score interval](http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval) for browser. A Node.js version can be found here https://github.com/msn0/wilson-node. | ||
Simple implementation of [Wilson score interval](http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval). | ||
|
||
Wilson score interval is a perfect tool for scoring comments. The only data you need is a number of upvotes and a total number of votes. It has really good properties even for small number of votes. | ||
|
||
## Installation | ||
|
||
``` | ||
npm install wilson-score-interval | ||
``` | ||
or | ||
|
||
``` | ||
bower install wilson-score-interval | ||
```sh | ||
$ npm i wilson-score-interval | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
wilson(upVotes, total); | ||
const wilson = require('wilson-score-interval'); | ||
|
||
/* | ||
wilson(upVotes, total); | ||
*/ | ||
|
||
wilson(430, 474); // {left: 0.8776750858242243, right: 0.9301239839930541} | ||
wilson(392, 436); // {left: 0.8672311846637769, right: 0.9239627360567735} | ||
wilson(10, 14); // {left: 0.4535045882751561, right: 0.882788120898909} | ||
wilson(430, 474); // { left: 0.8776750858242243, right: 0.9301239839930541 } | ||
wilson(392, 436); // { left: 0.8672311846637769, right: 0.9239627360567735 } | ||
wilson(10, 14); // { left: 0.4535045882751561, right: 0.882788120898909 } | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.