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

mlustard

v1.4.2

Published

A utility for determining what's interesting about a Blaseball game event

Downloads

3

Readme

mlustard

"Get out the rye bread and mlustard, Grandma, it is grand slalami time!"

Notdave Niehaus

mlustard takes ~~some rye bread~~ Blaseball game event data, and analyzes it for 'interestingness'. For instance, it can tell you whether regular old [redacted] stuff happened, like hits, outs, or stolen bases. But it can also tell you whether there's some tastier stuff on the play, like blooddrain, allergic reactions, or consumer attacks. (See the metadata collected by mlustard (below) for all currently-implemented event checks).

Usage

npm install mlustard
const mlustard = require('mlustard');

// see note below on game events
const gameEvent = {
  // ...
};

const analysis = mlustard.analyzeGameEvent(gameEvent);
  • gameEvent must be a valid game event object from the official Blaseball API event stream (the goods are in data.value.games.schedule), or from Chronicler.

  • analysis will be an object like in the following example (which registers a sacrifice flyout, with a run scored on the play):

{
  id: <the game event id>,

  gameStatus: null,
  runsScored: 1,

  batterUp: false,

  out: true,
  outMeta: {
    kind: 'fly',
    sacrifice: true,
    sacrificeMeta: {
      kind: 'score',
    },
  },

  hit: false,
  hitMeta: {
    kind: null,
    bigBucket: false,
  },

  steal: false,
  stealMeta: {
    success: null,
    baseStolen: null,
  },

  walk: false,

  special: false,
  specialMeta: {
    kind: null,
  },

  maximumBlaseball: false,
}

The metadata collected by mlustard

  • id: string || undefined

    • the game event ID
  • runsScored: number

    • how many runs were scored on the play
  • batterUp: boolean

    • whether a batter just showed up to bat
  • gameStatus: null || string

    • will be null or one of:
    • 'beforeFirstPitch', when the first pitch hasn't been thrown yet
    • 'firstHalfInningStart', when the first half of an inning is starting
    • 'secondHalfInningStart', when the second half of an inning is starting
    • 'halfInningEnd', when any half of an inning is ending on the play
    • 'gameEnd', when the game has ended
  • out: boolean

    • true when there is an out on the play
  • outMeta: object, with the props:

    • kind: null || string
      • will be one of:
      • 'fly'
      • 'ground'
      • 'strike'
      • 'caughtStealing'
      • 'unspecified' (as you sometimes see with sacrifice outs)
    • sacrifice: boolean
      • true when the out was a sacrifice
    • sacrificeMeta: object, with the following props:
      • kind: string || null
      • will be one of:
      • 'advance'
      • 'score'
  • hit: boolean

    • true when there is a hit on the play
  • hitMeta: object, with the props:

    • kind: null || string
      • will be one of:
      • 'single'
      • 'double'
      • 'triple'
      • 'homeRun'
      • 'grandSlam'
    • bigBucket: boolean
      • whether a Big Bucket was activated on the play
  • steal: boolean

    • true when there is an attempted steal on the play
  • stealMeta: object, with the props:

    • success: boolean
      • true when thief not caught, false otherwise
    • baseStolen: null || number
      • the base which was stolen (0-indexed)
  • walk: boolean

    • true when there is a walk on the play
  • baseRunners: object, with the props

    • first
    • second
    • third
    • fourth
    • all these props are objects, and if there is a runner on that given base, they have the following props:
      • playerName: string
        • the name of the player on base, or empty string
      • playerId: string
        • the ID of the player on base
  • special: boolean

    • true when there was a special event on the play
  • specialMeta: object, with the props:

    • kind: null || string
      • will be one of:
      • 'blooddrain'
      • 'isPartying'
      • 'reverb'
      • 'birdsCircle'
      • 'birdsPecked'
      • 'justBirds'
      • 'allergicReaction'
      • 'incinerated'
      • 'becameMagmatic'
      • 'feedback'
      • 'electricity'
      • 'unstable'
      • 'flickering'
      • 'consumersAttack'
      • 'consumersAttackDefended'
      • 'salmon'
  • maximumBlaseball: boolean

    • true when we're at MAXIMUM BLASEBALL

Contributors

Acknowledgments

You need a lot of things to make a node module, but at the very least, thanks go to:

Some last words

mlustard is not endorsed by nor affiliated with The Game Band. The Commisioner is doing a Great Job.