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

@opsimathically/svgcaptcha_improved

v0.0.3

Published

Modification of the original svgcaptcha node package to include a significant amount of randomization to eliminate current implementations of svgcaptcha solvers.

Readme

SVGCaptcha Improved

This package contains my own personal improvements to the svg-captcha package. The issue with the svg-captcha package as of right now, is that it's easily solvable (100% solve) using captcha solvers. When analyzing the existing solvers, they all rely on fingerprinting in order to solve captchas. To alleviate this, I've added a large amount of randomization with regards to path generation so that fingerprinting will no longer work. On top of this, I've added a lot of convienence features, and migrated the code to typescript.

Usage

import opentype from 'opentype.js';
import path from 'path';
import { SVGCaptchaImproved } from '@opsimathically/svgcaptcha_improved';

// define your font/captcha configurations below.  Fonts will be selected at random between what is
// provided here.  You can use one, or many fonts, doesn't matter.  The reason each font has it's own
// configuration, is tha some fonts are wider, smaller, better spaced, etc than others so you'll need
// to make adjustments based on whatever ttf fonts you supply to opentype.
const svgcaptchai = new SVGCaptchaImproved({
  fonts: {
    comic: {
      loaded_font: opentype.loadSync(
        path.resolve('./test/svgcaptcha_improved/test_fonts/Comismsh.ttf')
      ),
      config: {
        captcha: {
          character_length: 5,
          characters_to_use: 'ACDEFHLMPQRSTWXVZ'
        },
        output: {
          font_size: 96,
          width: 250,
          height: 100,
          reenforce_text_outline_count: 20
        },
        noise: {
          curved_line_count: 4,
          zigzag_line_count: 4,
          character_noise_multiplier: 3,
          arbitrary_code_point_remove_count: 15
        },
        colors: {
          background_color_hex: '#ffffff',
          stroke_color_hex: '#000000'
        }
      }
    },
    freedom: {
      loaded_font: opentype.loadSync(
        path.resolve('./test/svgcaptcha_improved/test_fonts/Freedom-10eM.ttf')
      ),
      config: {
        captcha: {
          character_length: 5,
          characters_to_use: 'ACDEFHLMPQRSTWXVZ'
        },
        output: {
          font_size: 56,
          width: 300,
          height: 100,
          reenforce_text_outline_count: 5
        },
        noise: {
          curved_line_count: 2,
          zigzag_line_count: 2,
          character_noise_multiplier: 1,
          arbitrary_code_point_remove_count: 2
        },
        colors: {
          background_color_hex: '#ffffff',
          stroke_color_hex: '#000000'
        }
      }
    },
    roboto: {
      loaded_font: opentype.loadSync(
        path.resolve('./test/svgcaptcha_improved/test_fonts/Roboto-Black.ttf')
      ),
      config: {
        captcha: {
          character_length: 5,
          characters_to_use: 'ACDEFHLMPQRSTWXVZ'
        },
        output: {
          font_size: 66,
          width: 250,
          height: 100,
          reenforce_text_outline_count: 5
        },
        noise: {
          curved_line_count: 2,
          zigzag_line_count: 2,
          character_noise_multiplier: 5,
          arbitrary_code_point_remove_count: 0
        },
        colors: {
          background_color_hex: '#ffffff',
          stroke_color_hex: '#000000'
        }
      }
    }
  }
});

// create a svg containing a captcha (will select from any of the 3 configured fonts at random)
const created_svg = await svgcaptchai.create();

// created_svg.data: contains your svg xml/tag/path data.  Embed it in a page, or store it as a .svg file.
// created_svg.text: contains your text solution for the captcha.

Example Generated Captcha Images

Captcha generation configurations for the example images are somewhat extreme, just to show how wacky it can get. Usually you'd configure your font options to be a bit more or less modest than those used to generate the following images.

Example Captcha Images

Install

npm install @opsimathically/svgcaptcha_improved

Building from source

This package is intended to be run via npm, but if you'd like to build from source, clone this repo, enter directory, and run npm install for dev dependencies, then run npm run build.

Usage

See API Reference for documentation

See unit tests for more direct usage examples