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

ethiopian-captcha

v2.0.0

Published

Ethiopian CAPTCHA: Amharic fidel and Ge'ez-numeral challenges with server-side distorted vector images, HMAC-hashed answers and single-use validation. Zero dependencies.

Readme

EthiopianCaptcha 🇪🇹 v2

A CAPTCHA built for Ethiopian users: Amharic fidel and Ge'ez-numeral math, rendered server-side as distorted vector images. Zero runtime dependencies. Node >= 18.

| type | what the user does | |---|---| | fidel | types the Amharic letters shown (default) | | geez-math | solves a small sum written in Ge'ez numerals, e.g. ፳፭ + ፲፪ = (answers in 37 or ፴፯) | | click-image | clicks the grid cell showing an Ethiopian item (lightweight, see notes) |

Install

npm install ethiopian-captcha

Server (Express example)

import express from "express";
import { createCaptcha } from "ethiopian-captcha";

const captcha = createCaptcha({ secret: process.env.CAPTCHA_SECRET });
const app = express();
app.use(express.json());

app.get("/captcha", async (req, res) => {
  res.json(await captcha.generate(req.query.type)); // { captchaId, image, type, expiresAt }
});

app.post("/signup", async (req, res) => {
  const r = await captcha.validate(req.body.captchaId, req.body.captchaInput);
  if (!r.success) return res.status(400).json(r); // { code, message, attemptsLeft? }
  // ...continue
});

Result codes: OK, INVALID_ID, EXPIRED, INCORRECT, TOO_MANY_ATTEMPTS, UNSUPPORTED_TYPE. A captcha is single-use: success, expiry, or the last failed attempt all consume it.

React

import { EtCaptcha } from "ethiopian-captcha/react";

<EtCaptcha
  challenge={challenge}            // response of /captcha
  loading={loading}
  onRefresh={fetchChallenge}
  onVerify={({ captchaId, input }) => submit(captchaId, input)}
  lang="both"                      // "both" | "en" | "am"
/>

The component makes no network calls. Strings are English + Amharic; have a native speaker review the Amharic labels before launch.

Production setup (read this)

  1. Build the vector glyphs (one time, needs pip install fonttools):
    npm run build:glyphs -- /path/to/NotoSansEthiopic-Bold.ttf
    Use an OFL font (Noto Sans Ethiopic, Abyssinica SIL) and commit the generated src/render/glyphs.js. Without it the library falls back to SVG <text>, which works but is readable by a script without any OCR (a warning is logged when NODE_ENV=production).
  2. Set a secret (32+ random bytes) in env.
  3. Multiple servers / serverless: pass a shared store (anything with get/set/delete, e.g. Redis with TTL) and the same secret on every instance. The default store is in-process only. With a networked store, make attempt counting atomic if you can.
  4. Serve the image via <img>, never inline the SVG in the DOM.
  5. Rate-limit /captcha and the validate route by IP; that is outside this library.

Options

createCaptcha({
  type: "fidel", count: 4, ttl: 120000, maxAttempts: 3,
  maxEntries: 10000, imageBaseUrl: "https://ethiopian-captcha.vercel.app/",
  secret, store,
});

Honest limits

  • No CAPTCHA stops a determined attacker with a trained model or a solving service; this raises the cost and blocks casual bots. Pair with rate limiting.
  • click-image uses one public sprite sheet whose answers ship in the npm package, so it is a lightweight challenge only. Prefer fidel or geez-math for anything sensitive.
  • Typing fidel needs an Amharic keyboard. For mobile/Latin-keyboard users, geez-math (digits accepted) is the friendlier option.

Upgrading from 1.x

See CHANGELOG.md: functions are async, fidel returns image instead of letters, React prop is now challenge.

MIT