This package has been deprecated

Author message:

wilson-node is deprecated. Please install wilson-score-interval instead.

wilson-node

1.0.0 • Public • Published

Wilson score interval Build Status

Simple implementation of Wilson score interval in Node.js. For browser version refer to https://github.com/msn0/wilson-score-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-node

Usage

var wilson = require('wilson-node');
 
wilson(upVotes, total);
 
wilson(430, 474); // → Object{left: 0.8776750858242243, right: 0.9301239839930541}
wilson(392, 436); // → Object{left: 0.8672311846637769, right: 0.9239627360567735}
wilson(10, 14);   // → Object{left: 0.4535045882751561, right: 0.882788120898909}

Package Sidebar

Install

npm i wilson-node

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Last publish

Collaborators

  • michal.jezierski