Skip to content

A simple function for computing the current win streak of a team in Google Sheets.

Notifications You must be signed in to change notification settings

indrajithbandara/currentStreak

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

currentStreak(games)

A simple javascript function for use with Google Sheets, written for the Santa Cruz Softball League's scoreboard spreadsheet.

Takes an array of game results and returns a string representing the team's current streak.

It's tolerant of partial seasons, draws, losses, and wins.

Input

Takes a column or row of games, coded as numbers where:

  • 1 is a win
  • 0 is a draw
  • -1 is a loss

Returns a string like W1 or L4 or D2 for the result.

Testing and running yourself

  • Install node.js
  • Run npm install in this directory.
  • run npm test to run the test script against the main function, in index.js.

About

A simple function for computing the current win streak of a team in Google Sheets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%