Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 1.42 KB

README.md

File metadata and controls

80 lines (63 loc) · 1.42 KB

Tabcorp

Through the given 'ctor' params data, the Tabcorp set of calculation rules, to return the results of each produce. These data can be collected via the 'stdin', or you can custom the test data, and quickly see the results via the 'stdout'.

1. `$ npm install` install 'Tabcorp' dependent package
2. `cp config.js` modify configuration file
3. `$ npm test` make sure tesing
4. `$ node betting.js/npm start`

Constructions

Tesing

$ npm test
$ mocha test
$ grunt mochaTest

js-coverage

$ mocha --require blanket -R html-cov > coverage.html
the file coverage.html to show results

debugger

$ npm install -g node-inspector
$ node --debug betting.js / node --debug-brk betting.js
$ node-inspcetor

travis

using travis-ci require to configure via github

Quick Examples

var obj = Event();
obj.listen('xx',function(data){
     //data
});
obj.one('xx',function(data){
    //data
});
obj.remove('xx');
obj.trigger('xx','');
var tc = new Tabcorp(arrData);
var rtnData = tc.generateWin();
tc.generateWin(function (data) {
    //
});
var rtnData = tc.generateExacta();
tc.generateExacta(function (data) {
    //
});
var rtnData = tc.generatePlace();
tc.generatePlace(function (data) {
    //
});

.

api

the exception in api do not capture, so if use inappropriate data ,it may cause unexpected output exception.

Contribution

License

MIT