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

@corbet-labs/cink

v0.2.0

Published

Handwritten signature image rendering for correspondence. Pixels, not signatures. Mirrors the cink Rust crate release line.

Readme

cink

Prepare handwritten signature images for correspondence.

crates.io npm PyPI Rust API

Recognize PNG, JPEG, and SVG input, inspect raster dimensions, calculate an aspect-preserving size, and generate a Typst image call. Runs without an image-decoding library.

import { imageSnippet } from '@corbet-labs/cink';

imageSnippet('/signature.png', 31.5);
// #image("/signature.png", height: 31.5pt)

Install

| Environment | Command | | --- | --- | | Rust / Cargo | cargo add cink | | Python / pip | python -m pip install cink | | Python / uv | uv add cink | | Node.js / npm | npm install @corbet-labs/cink | | pnpm | pnpm add @corbet-labs/cink | | Yarn | yarn add @corbet-labs/cink | | Bun | bun add @corbet-labs/cink | | Deno | deno add npm:@corbet-labs/cink |

The 0.1.4 JavaScript distribution includes compiled ESM, CommonJS, TypeScript declarations, and a standalone browser module. Node.js 20+ is supported; no TypeScript loader is required.

// CommonJS
const { imageSnippet } = require('@corbet-labs/cink');
<script type="module">
  import { imageSnippet } from 'https://cdn.jsdelivr.net/npm/@corbet-labs/[email protected]/dist/browser.js';
  console.log(imageSnippet('/signature.png', 31.5));
</script>

Python 3.10+ packages are available on PyPI. See the installation guide for CLI commands and other distribution options. JSR publication and Typst availability are listed there explicitly.

Rust

use cink::image_snippet;

assert_eq!(image_snippet("/signature.png", 31.5, None), "#image(\"/signature.png\", height: 31.5pt)");

Python

from cink import image_snippet

assert image_snippet("/signature.png", 31.5) == '#image("/signature.png", height: 31.5pt)'

API

| JavaScript / Python or Rust | Purpose | | --- | --- | | normalize | Recognize a base64 image or data URL | | exceedsLimits / exceeds_limits | Check a raster pixel budget | | scaleToFit / scale_to_fit | Calculate a downscaling factor | | signatureSize / signature_size | Fit dimensions to a point size | | imageSnippet / image_snippet | Generate a Typst image call |

Base64 input uses the standard alphabet, required padding, and canonical trailing bits; embedded whitespace is rejected.

PNG and JPEG dimensions are read from headers; this is not a full raster integrity check. SVG passes through without sanitization or known dimensions. Unrecognized headers and unsupported formats return null/None. Nonpositive, nonfinite, and unrepresentable requested sizes return null/None. Resampling and placement belong to the caller. These are handwriting images, not cryptographic or electronic signatures.

Correspondence family

| Library | Responsibility | | --- | --- | | cletter | Compose the correspondence helpers | | cgreet | German salutations and titles | | cfarewell | Locale-specific closings | | cdate | Calendar-date formatting | | cink | Handwritten signature images |

Development

Behavior is defined by the locale tables and shared conformance vectors. Rust, JavaScript, and Python run the same vectors. Selected CI checks exercise installed JavaScript tarballs, Python wheels and command-line entrypoints, and Typst packages. Release validation records the actual runtime and platform; Linux results do not establish native Windows or macOS coverage. All five Rust crates forbid unsafe code in their own source.

See the release guide for generation, verification, and publication commands.

License

Copyright 2026 Julian Y. Richard Corbet. The 0.2.0 release line is licensed under LGPL-3.0-only [WITH LGPL-3.0-linking-exception](https://github.com/corbet-labs/cink/blob/main/LICENSES/LGPL-3.0-only%20WITH%20LGPL-3.0-only WITH LGPL-3.0-linking-exception.txt), with the incorporated GPL version 3. Combined works may link statically or dynamically without relinking duties; library modifications stay LGPL. Applications can use a different license subject to the LGPL's conditions. Previously released and already prepared distributions retain their original grants. The installation examples above refer to those available releases; 0.2.0 has not yet been published to registries.

See the licensing notes for distribution conditions and retained notices.