npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nfl-stats

v1.0.5

Published

Check mutiple stat type for anything NFL related.

Downloads

3

Readme

NFL Stat Tracker Package.

This package can fetch any NFL related statistic.

Installation

Install nfl-stats with npm

npm install nfl-stats

Usage/Examples

Get Weekly Games

const nfl = require("nfl-stats");

let weeklyGames = await nfl.getWeeklyGames();

Output

[{
    id: (STRING , game id),
    date: (STRING , game date & time),
    team1: (STRING, team #1 name),
    team2: (STRING, team #2 name),
    
}, 
{etc..}, 
{etc..}]

Get Game Score

const nfl = require("nfl-stats");

let score = await nfl.getGameScore(${gameID});

Output

[{
    team: (STRING , team name),
    date: (STRING , score),
},
{
    team: (STRING , team name),
    date: (STRING , score),
}]

Get Team Logo

const nfl = require("nfl-stats");

let logoUrl = await nfl.getTeamLogo(${teamID});

Output

{
    team: (STRING , team name),
    logo-url: (STRING , URL to team logo),
}

Get Current Week

const nfl = require("nfl-stats");

let week = await nfl.getCurrentWeek();

Output

{
    team: (STRING , week number),
}

Get Player ID From Name

const nfl = require("nfl-stats");

 let id = await nfl.getAthleteId("George Kittle");

Output

{
    id: (STRING , player id),
}

Get Player Photo URL

const nfl = require("nfl-stats");
let photoUrl = await nfl.getAthleteHeadshotImage(${PlayerID});

Output

{
    headshotURL: (STRING , headshot URL),
}

Usuful IDs

| Team Name | Team ID | |----------------------- |--------- | | Atlanta Falcons | 1 | | Buffalo Bills | 2 | | Chicago Bears | 3 | | Cincinnati Bengals | 4 | | Cleveland Browns | 5 | | Dallas Cowboys | 6 | | Denver Broncos | 7 | | Detroit Lions | 8 | | Green Bay Packers | 9 | | Tennessee Titans | 10 | | Indianapolis Colts | 11 | | Kansas City Chiefs | 12 | | Las Vegas Raiders | 13 | | Los Angeles Rams | 14 | | Miami Dolphins | 15 | | Minnesota Vikings | 16 | | New England Patriots | 17 | | New Orleans Saints | 18 | | New York Giants | 19 | | New York Jets | 20 | | Philadelphia Eagles | 21 | | Arizona Cardinals | 22 | | Pittsburgh Steelers | 23 | | Los Angeles Chargers | 24 | | San Francisco 49ers | 25 | | Seattle Seahawks | 26 | | Tampa Bay Buccaneers | 27 | | Washington Commanders | 28 | | Carolina Panthers | 29 | | Jacksonville Jaguars | 30 | | Baltimore Ravens | 33 | | Houston Texans | 34 |

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Authors