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 🙏

© 2025 – Pkg Stats / Ryan Hefner

world-cup-history

v2.0.13

Published

FIFA World cup historical data

Downloads

14

Readme

world-cup-history is an npm package for FIFA World cup historical data. It contains information about the host country, winner, runner up, top goal scorer(s), attendance and number of matches played in every FIFA world cup tournament since 1930 when the first tournament held

Install

$ npm install world-cup-history

Usage

To use world-cup-history in a JavaScript file,

const worldCupHistory = require('world-cup-history');

To get an object containing information about a world cup year, e.g 1978,

worldCupHistory.year(1978);

The line of code above will return the following object

{
	hostCountry: 'Argentina',
	winner: 'Argentina',
	runnerUp: 'Netherlands',
	topGoalScorer: [
		{ 
		name: 'Mario Kempes', 
		country: 'Argentina', 
		numberOfGoals: 6 
		}
	],
	totalAttendance: 1545791,
	numberOfMatches: 38
}

The keys listed below give us information for the selected tournament year

  • hostCountry
  • winner
  • runnerUp
  • topGoalScorer
  • totalAttendance
  • numberOfMatches

The following are examples of the usage of all the keys listed above

worldCupHistory.year(1934).winner; // Who won the world cup in the 1934? 
worldCupHistory.year(1966).hostCountry; // Which country hosted the world cup in 1966?
worldCupHistory.year(1978).runnerUp; // Which country was the runner up in 1978?
worldCupHistory.year(1994).topGoalScorer[0].name; // Who was the highest goal scorer at the 1994 world cup?
worldCupHistory.year(1990).totalAttendance; // What was the total attendance for the world cup in 1990?
worldCupHistory.year(1986).numberOfMatches; // How many matches were played at the 1986 world cup?

Additional Information

  • The topGoalScorer attribute returns an array. This is because there are tournaments which have more than one top scorer.
  • The World cup is traditionally hosted by only one country. The exception is 2002 when South Korea and Japan were co-hosts. The two countries are separed by a Comma in this package. Some string manipuation (e.g str.split([separator[, limit]])) might be needed for this special case if you are interested in getting the countries as separate values.

I used the data in this package in an app. I thought other people might find it useful and decided to extract it into a package for others... and for myself.

Mayowa Ajibola Sogbein

License

MIT