betcruncher

1.0.1 • Public • Published

Build Status

Betcruncher

Betcruncher is a bet calculator engine for JavaScript. This readme needs work!

var betcruncher, slip, selections;
 
betcruncher = require("betcruncher");
 
slip = {
    type: "single",
    stake: 10,
    eachWay: false
};
 
selections = [
    { odds: "10/1", terms: "1/4", position: 1 }
];
 
console.log(betcruncher(slip, selections)); // { totalStake: 10, returns: 110, profit: 100 }

Notes

Position can be either < 0 for void bet, 0 for lose, 1 for win, or > 1 for place.

Each way terms specifies the fraction of the odds given for each-way bets. This is usually one quarter.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    3
  • 1.0.0
    0

Package Sidebar

Install

npm i betcruncher

Weekly Downloads

3

Version

1.0.1

License

GPL-2.0

Last publish

Collaborators

  • mikehall314