soccer-ab
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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();
});

Package Sidebar

Install

npm i soccer-ab

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

91.5 kB

Total Files

16

Last publish

Collaborators

  • bazzastyle