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

slopsock

v0.1.0

Published

SlopSock cleans up busted AI logos and kicks out SVG you can actually use

Readme

🧦SlopSock

Deterministic raster to professional SVG cleanup for AI born logos and other pixel graphics.

SlopSock does two things in sequence.

First it uses Inkscape's native trace action to turn a PNG, JPG, WEBP, or GIF into stacked color vector layers.

Then it throws away the wobbly trace paths and rebuilds each layer from geometry, using contour resampling, corner aware smoothing, adaptive simplification, ellipse fitting for badge rings and other clean rounded forms, and cubic Bézier redraw. The result is a fresh SVG that keeps the concept while cutting the tiny vector sins, weird oblong mush, and spaghetti line artifacts that show up in AI generated logos.

Install

npm install -g slopsock

Package name is slopsock, but it is not published to the npm registry yet. Use the curl installer below for now.

For a one line machine bootstrap that installs the host dependencies first on supported systems:

curl -fsSL https://slopsocket.lmtlssss.fun/install.sh | bash

SlopSock expects these tools on the machine.

Inkscape 1.3 or newer

Python 3.10 or newer

On Linux, xvfb-run is strongly recommended so Inkscape can trace headlessly.

If the required Python packages are already installed, SlopSock uses the system Python. If not, it bootstraps a private virtual environment on first run and installs the required Python packages automatically.

Quick start

slopsock ./logo.png

That writes these files next to the input.

logo.clean.svg

logo.preview.png

logo.compare.png

logo.report.json

Typical AI logo pass

slopsock ./bison.jpg \
  --profile ai-logo \
  --trace-svg ./bison.traced.svg \
  --output ./bison.clean.svg \
  --preview ./bison.preview.png \
  --compare ./bison.compare.png \
  --report ./bison.report.json

Profiles

default is a balanced general purpose mode.

ai-logo pushes harder on mushy rounded blobs, near circular badges, and synthetic curvature wobble.

badge favors circular marks, emblems, and stamp style logos.

silhouette is tuned for bold single shape marks and character silhouettes.

Controls

Trace stage controls map directly to the Inkscape trace action.

--scans 8
--smooth true
--stack true
--remove-background true
--speckles 4
--smooth-corners 1.0
--optimize 0.2

Rebuild stage controls tune the redraw engine.

--render-size 2048
--alpha-blur 1.2
--spacing 4.0
--curve-smooth 1.25
--simplify 2.0
--tension 0.88
--noise-floor 1.0
--intersection-bias 0.85
--oblong-bias 0.75
--symmetry-bias 0.4
--ellipse-fit true
--min-area 36
--preview-scale 1600

The knobs matter like this.

spacing controls how densely contours are resampled before redraw.

curve-smooth controls how hard the path is smoothed before simplification.

simplify controls point reduction. Higher numbers reduce more anchors.

tension controls Bézier handle reach. Higher numbers feel more fluid.

noise-floor increases cleanup strength on tiny local wobble.

intersection-bias preserves tight junctions and near touches more carefully.

oblong-bias increases regularization for suspicious rounded synthetic blobs.

symmetry-bias increases willingness to snap clean rings and ellipse like shapes into mathematically regular curves.

Examples

A heavy cleanup pass for noisy enterprise logo comps.

slopsock ./mark.jpg \
  --profile ai-logo \
  --scans 10 \
  --speckles 6 \
  --curve-smooth 1.5 \
  --simplify 2.2 \
  --oblong-bias 1.2 \
  --symmetry-bias 0.7

A more conservative pass that preserves sharp letterforms.

slopsock ./wordmark.png \
  --profile default \
  --curve-smooth 0.95 \
  --simplify 1.4 \
  --intersection-bias 1.0 \
  --ellipse-fit false

How it works

SlopSock does not blindly call simplify on a traced SVG and hope the goblin leaves the building.

It traces the raster into stacked fills.

It rasterizes each traced layer to a clean alpha mask at high resolution.

It extracts contours and holes.

It computes shape descriptors such as circularity, eccentricity, corner count, local wobble, and near self approach density.

It chooses adaptive smoothing and simplification constants per contour.

It fits ellipses when the contour is strongly badge like.

It converts the cleaned contours into fresh cubic Bézier paths.

It writes a new layered SVG and a report with similarity metrics against the traced intermediate.

CLI help

slopsock --help

Diagnostics

slopsock --doctor

Development

Run tests.

npm test

The smoke test skips the end to end trace pass when Inkscape is unavailable on the host. Use the curl installer above or install Inkscape manually to exercise the full pipeline.

Pack the module like npm would publish it.

npm pack

Known boundaries

This is strongest on logos, badges, posters, emblems, mascots, and graphic marks with reasonably flat color regions.

It is not a photorealistic vectorizer.

Tiny distressed texture and photographic grain are intentionally regularized away because those are usually the exact gremlins poisoning production vectors.