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 🙏

© 2026 – Pkg Stats / Ryan Hefner

helldivers2-screenshots-analyzer

v2.0.1

Published

A screenshots analyzer for Helldivers 2

Downloads

46

Readme

Helldivers 2 Screenshots Analyzer

A utility for analyzing screenshots from the game Helldivers 2 and identifying key elements by color detection.

Find and count every completed primary and secondary missions

Detected missions

Installation

npm install helldivers2-screenshots-analyzer

Usage


import { parseImage } from 'helldivers2-screenshots-analyzer';

const primaryParseResult = await parseImage({
  filename: 'screenshot1',
  label: 'mission-icons',
  sourcePath: 'https://raw.githubusercontent.com/wlp2s0/war-crime-counter/d21873b269f555d599977210f87e18aa7663b89f/test/fixtures/0_3_5.png',
  targetColor: { r: 255, g: 135, b: 36, tolerance: 32 }
});

const secondaryParseResult = await parseImage({
  filename: 'screenshot1',
  label: 'mission-icons',
  sourcePath: 'https://raw.githubusercontent.com/wlp2s0/war-crime-counter/d21873b269f555d599977210f87e18aa7663b89f/test/fixtures/0_3_5.png',
  targetColor: { r: 113, g: 245, b: 255, tolerance: 42 }
});

console.log({ primaryMissions: primaryParseResult.success, secondaryMissions: secondaryParseResult.success });
/*
Expected output:
{ primaryMissions: 3, secondaryMissions: 5 }
*/

API Reference

parseImage(options)

Parses an image to detect and classify areas matching a target color.

Options

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | filename | string | Required | Name of the file to be parsed | | label | string | Required | Label used for debugging and console output | | sourcePath | string | Required | Full path to the source image, it can either be a local fs path or an url | | targetColor | TargetColour | Required | The target color to detect in the image | | minMergeThresholdRatio | number | 0.001 | Minimum threshold ratio for merging detected regions | | maxMergeThresholdRatio | number | 0.4 | Maximum threshold ratio for merging detected regions | | minWidthThresholdRatio | number | 0.015 | Minimum threshold ratio for detected region width | | minHeightThresholdRatio | number | 0.015 | Minimum threshold ratio for detected region height | | maxWidthThresholdRatio | number | 0.14 | Maximum threshold ratio for detected region width | | maxHeightThresholdRatio | number | 0.14 | Maximum threshold ratio for detected region height | | allowedBoxProportion | number | 3 | Proportion threshold for width/height ratio | | cropRatioWidth | number | 0.275 | Width ratio for cropping the image | | cropRatioHeight | number | 0.35 | Height ratio for cropping the image | | noiseThresholdPercentage | number | 7.5 | Percentage threshold for noise detection | | plainColorThresholdPercentage | number | 90 | Percentage threshold for plain color detection | | marginThresholdRatio | number | 0.005 | Margin threshold ratio for detected regions | | yCropOffsetRatio | number | 0.025 | Vertical offset ratio for cropping | | debug | boolean | false | Enable debug mode to save intermediate images | | baseDebugPath | string | "./debug" | Base path for saving debug images |

Returns

{
  success: number, // Count of successfully detected icons
  plain: number,   // Count of plain color boxes
  small: number,   // Count of boxes that are too small
  big: number,     // Count of boxes that are too large
  noisy: number,   // Count of noisy boxes
  abnormal: number // Count of boxes with abnormal proportions
}

License

MIT