Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function betBlocked(v) {
  2. return (v === null || this.line_blocked);
  3. }
  4.  
  5. function convertWin12(line) {
  6. return ["WIN__P1", "WIN__P2"].map((bet, i) => buildFactor(bet, line.V[i], betBlocked(line.V[i])));
  7. }
  8.  
  9. function getConverterFn(line) {
  10. if (line.idTipMarket === 491) return convertWin12;
  11. //...
  12. }
  13.  
  14. lines.forEach(line => {
  15. const factors = {};
  16.  
  17. const converterFn = getConverterFn(line);
  18. if (converterFn) {
  19. converterFn(line).forEach(f => {
  20. factors[f.bet] = f;
  21. });
  22. }
  23.  
  24. return factors;
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement