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

@freetextfromimage/rendercheck

v0.1.0

Published

Verify that AI-generated UI shows the correct visible text using OCR and assertions

Downloads

77

Readme

RenderCheck

Verify that AI-generated UI shows the correct visible text using OCR and assertions.

Why RenderCheck?

AI coding tools ship UI fast, but existing tests miss a critical class of bugs: wrong visible text. Your DOM tests pass, but users see:

  • Wrong currency symbols ($ instead of £)
  • Broken confirmation messages
  • Invisible or truncated text
  • Date/time format mismatches
  • Localisation failures

RenderCheck catches these by comparing actual rendered text (via OCR) against expected text in your tests.

Installation

npm install @freetextfromimage/rendercheck

Requires an API key from FreeTextFromImage.

Quick Start

import { verify } from '@freetextfromimage/rendercheck';

const result = await verify({
  imagePath: './screenshot.png',
  expectedText: 'Payment Successful',
  apiKey: process.env.FTFI_API_KEY,
});

console.log(result.outcome); // 'pass' | 'fail' | 'partial'

API Reference

verify(options)

Verifies that a screenshot contains expected visible text.

Parameters:

interface VerifyOptions {
  imagePath?: string;           // Path to screenshot file
  imageBuffer?: Buffer;         // Or raw image buffer
  expectedText: string;         // Text that should be visible
  apiKey?: string;              // FreeTextFromImage API key (required)
  baseUrl?: string;             // Custom API endpoint (default: https://freetextfromimage.com)
  timeout?: number;             // Request timeout in ms (default: 30000)
}

Returns:

interface VerificationResult {
  outcome: 'pass' | 'fail' | 'partial';
  foundWords: string[];         // Words from expectedText that were found
  missingWords: string[];       // Words from expectedText that were NOT found
  extractedText: string;        // Full OCR output from the screenshot
  confidence: number;           // Ratio of found words to total expected (0–1)
  message: string;              // Human-readable summary
}

Playwright Integration

import { test, expect } from '@playwright/test';
import { verify } from '@freetextfromimage/rendercheck';

test('checkout page shows correct total', async ({ page }) => {
  await page.goto('https://example.com/checkout');
  const screenshot = await page.screenshot();

  const result = await verify({
    imageBuffer: screenshot,
    expectedText: 'Total: £99.99',
    apiKey: process.env.FTFI_API_KEY,
  });

  expect(result.outcome).toBe('pass');
});

Cypress Integration

import { verify } from '@freetextfromimage/rendercheck';

describe('Order confirmation', () => {
  it('displays the correct order number', async () => {
    cy.visit('https://example.com/orders/123');
    cy.screenshot('order-page');

    const screenshot = cy.readFile('cypress/screenshots/order-page.png', 'binary');
    const result = await verify({
      imageBuffer: Buffer.from(screenshot),
      expectedText: 'Order #12345 confirmed',
      apiKey: process.env.FTFI_API_KEY,
    });

    expect(result.outcome).toBe('pass');
  });
});

Limitations

  • Verifies visible text only — does not check layout, colour, or accessibility
  • OCR accuracy depends on image quality (contrast, focus, resolution)
  • Best used with clear, high-contrast text
  • Requires a FreeTextFromImage API key (free tier available)

Privacy

Screenshots are sent to the FreeTextFromImage API over HTTPS, processed in memory, and immediately discarded. No images or extracted text are persisted.

See Privacy Architecture for details.

Support

License

MIT