Skip to content

undg/los

Live Odds Services

Live Football World Cup Scoreboard library that shows all the ongoing matches and their scores.

👪 All Contributors: 2 🤝 Code of Conduct: Kept 🧪 Coverage 📝 License: MIT 📦 npm version 💪 TypeScript: Strict

Usage

git clone https://github.com/undg/los
cd los
pnpm i los
import los from "los";

const board = new los.board();
board.add("MEX-CAN", [{ name: "Mexico" }, { name: "Canada" }]); // Start a new match, assuming initial score 0 – 0 and adding it the scoreboard.
board.add("ESP-BRA", [
	{ name: "Spain", score: 3 },
	{ name: "Brazil", score: 2 },
]); // Start a new match, assuming initial score 3 – 2 and adding it to the scoreboard.
board.update("MEX-CAN", [1, 0]); // Update score as a pair of absolute scores: home team score and away
board.delete("MEX-CAN"); // Finish match currently in progress. This removes a match from the scoreboard.
board.get(); // Get a summary of matches in progress ordered by their total score. The matches with the same total score will be returned ordered by the most recently started match in the scoreboard.
board.render(); // same as get(), but return array of strings if format: "Uruguay 6 - Italy 6"

board.getTeamTotalScore("Mexica");

Contributors

undg
undg

💻 🖋 📖 🤔 🚇 🚧 📆 🔧

💙 This package was templated with create-typescript-app.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published