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

scorekeeper

v1.0.12

Published

Scorekeeping app.

Downloads

2

Readme

Scorekeeper

Build Status License npm

Objective

Scorekeeper is a tool for parsing through a .txt file of tournament scores, calculating rankings, and writing the rankings to a .txt file. It is designed to accept a single .txt file of game scores as input, and output a .txt file of tournament rankings based on the following scoring format:

Win - 3 Points
Tie - 1 Point
Loss - 0 Points

The input .txt file should resemble the following format:

Falcons 30, Panthers 10
Green Giants 12, Red Pandas 35
Gophers 22, Vikings 22
Lions 12, Bears 24
Falcons 23, Bears 42
Red Pandas 10, Panthers 30
Green Giants 13, Gophers 13
Vikings 32, Lions 23
Falcons 23, Panthers 30
Red Pandas 10, Bears 42
Green Giants 13, Lions 23
Vikings 32, Gophers 13

and output the following:

1. Bears 9
2. Vikings 7
3. Panthers 6
4. Falcons 3
4. Lions 3
4. Red Pandas 3
7. Gophers 2
8. Green Giants 1

CLI

Installation

Installing scorekeeper globally maps an executable to the keyword "scorekeeper"

$ npm install scorekeeper -g

Usage

Scorekeeper CLI requires a single argument: <fileName>, which should be a .txt file representing a list of scores.

$ scorekeeper report Scores.txt

Optional arguments:

The -d flag is used to mark a <destinationName>. When provided with a valid input, -d will write a report of the tournament rankings to a local file.

$ scorekeeper report Scores.txt -d Rankings.txt

Package

Installation

$ npm install scorekeeper --save

Usage

Using the core package inside of a NodeJS project is easy!

The scorekeeper function accepts a single argument, an options Object.

import scorekeeper from 'scorekeeper';

const options = {
  fileName: 'Scores.txt',
  destName: 'Rankings.txt', // optional
};

const rankings = scorekeeper(options);

// `rankings` will be a sorted Array of the tournament standings.

Demo

This application is developed using yarn for package management. Using npm for project dependencies has not been tested, but should subsitute just fine.

$ git clone https://github.com/BlakeGuilloud/scorekeeper.git

$ cd scorekeeper && yarn // OR npm install

The core functionality of the application exists in the /lib folder of the project.

A demo of the application lives in /demo, and can be triggered using the following commands:

$ yarn demo // Prints tournament rankings from `/demo/scores.txt` to the console

$ yarn demo:write // Writes a .txt file containing tournament rankings to the `/demo` directory.

An application using this project can be found here.