2.0.1 • Published 4 years ago

soccer-ab v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

soccer-ab

Information on Serie A players and teams

Installation

$ sudo npm i -g typescript
$ npm i express
$ npm i -D typescript ts-node nodemon @types/node @types/express
$ npm install --save soccer-ab

Function list

  • allTeams: List of all teams
  • teamAvaiable: Check if the team exists
  • allPlayersForTeam: List of all players of an input team
  • playerForTeam: Random player of an input team
  • allPlayers: List of all players
  • teamForPlayer: Given as input the name of the player to print the belonging team
  • playersForRole: List of all players with a certain role
  • playerRandom: Random player

Usage

import express from 'express';
import * as soccer from 'soccer-ab';
const app = express();

Basic usage

app.get('/players', (req, res, next) => {
    res.json(soccer.allPlayers());
    next();
});
2.0.1

4 years ago

2.0.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago