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

inklin

v3.0.2

Published

Zero-dependency terminal text styling with Truecolor support, state-aware nested restoration, and JIT-targeted execution.

Readme

Inklin

Terminal text styling for command-line interfaces.

Inklin provides a chainable API for string styling with support for state-aware style restoration, Truecolor (RGB/Hex), and CLI hyperlinks, within a zero-dependency footprint.

Quick Start

Node.js (ESM/CJS)

import inklin from 'inklin';
console.log(inklin.blue.bold('System Initialized'));

Primary Specifications

  • Zero Runtime Dependencies: Self-contained implementation.
  • Module Compatibility: Support for Node.js (ESM/CJS).
  • Style Restoration: State-aware mechanism that handles nested \x1b[0m resets.
  • Automatic Downsampling: Detects environment capabilities and maps Truecolor to ANSI 256 or 16-color palettes as required.
  • JIT-Targeted Engine: Utilizes monomorphic property access for deterministic performance.

Installation

npm install inklin

Extended Usage

Common Use Case: Structured Logging

const log = (level, msg) => {
  const styles = {
    info: inklin.blue.bold,
    warn: inklin.yellow.italic,
    error: inklin.bgRed.white.bold
  };
  console.log(`${styles[level](` ${level.toUpperCase()} `)} ${msg}`);
};

log('info', 'Process started.');
log('error', 'Connection failed.');

Style Nesting

Inklin manages the ANSI escape stack to ensure nested styles return to the outer context.

console.log(
  inklin.red(`Outer Red ${inklin.blue.bold('Inner Blue Bold')} Outer Red`)
);

Hyperlinks

Generates clickable links in supported terminal emulators.

console.log(inklin.link('Repository', 'https://github.com/Sapirrior/inklin'));

Tagged Templates

const status = 'Operational';
console.log(inklin.green.bold`System is ${status}.`);

API Reference

| Category | Properties | | :--- | :--- | | Modifiers | reset, bold, dim, italic, underline, inverse, strikethrough | | Colors | black, red, green, yellow, blue, magenta, cyan, white, gray | | Brights | redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright | | Backgrounds | bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray |

Methods

  • hex(string) / bgHex(string): Applies colors via hexadecimal strings (e.g., #ff0000).
  • rgb(r, g, b) / bgRgb(r, g, b): Applies colors via RGB integers (0-255).
  • link(text, url): Generates an ANSI hyperlink sequence.
  • enable() / disable(): Toggles global styling state.

Technical Architecture

Inklin v3.0.2 utilizes a JIT-Targeted Prototype Architecture designed for deterministic performance and memory stability.

Key Implementation Details

  • Self-Overwriting Getters: Style properties replace themselves with static references upon first access, maintaining stable hidden classes (shapes) in the V8 engine.
  • Global Regex Registry: Manages compiled regular expressions through a centralized cache to ensure a finite memory footprint.
  • Automatic Capability Detection: Assesses terminal capabilities to determine the appropriate color fidelity level.

License

MIT © Sapirrior