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

qznt

v1.0.36

Published

A lightweight typed utility toolkit for modern TypeScript environments.

Readme

qznt

qznt (pronounced as in ex-quisite) is a lightweight, typed, high-performant utility toolkit for modern TypeScript/JavaScript and Node.js environments.

🚀 Installation

npm install qznt
# or
pnpm add qznt
# or
yarn add qznt

🛠 Quick Start

You can import this library as qznt, $, or by namespace.

import qznt from "qznt";
// or
import { $ } from "qznt";
// or
import { obj, Loop, date } from "qznt";

// Nested object access (defaults to "dark" if mode is undefined)
const theme = qznt.obj.get(settings, "ui.theme.mode", "dark");

// Readable durations
const time = $.date.duration(Date.now() + 5000); // "in 5 seconds"

📦 Namespaces

  • qznt.arr (Arrays): Advanced chunk, cluster, shuffle, unique, and seqMap
  • qznt.async (Promises): retry logic with exponential backoff and delay
  • qznt.date (Time): Shorthand parsing ("1h 30m"), duration (digital/hms), and eta
  • qznt.fn (Functions): memoize with TTL and custom resolvers
  • qznt.format (Strings): currency, memory (bytes), ordinal, and compactNumber
  • qznt.fs (File System): Efficient recursive directory scanning with readDir
  • qznt.is (Predicates): Type guards: is.today, is.empty, is.object, and is.sorted
  • qznt.math (Calculations): lerp, invLerp, remap, percent, and sum
  • qznt.num (Numbers): Essential logic like clamp and range handling
  • qznt.obj (Data): Type-safe deep paths (get, set, merge, pick, omit)
  • qznt.rnd (Random): Seedable PRNG, weighted choice, sampler, and chance
  • qznt.timing (Execution): debounce, throttle, and promise-based wait
  • qznt.to (Transformations): Powerful data mappers like to.record

These are just the highlights, there's more inside.

✨ Featured Utilities

The Smart Loop

qznt.Loop ensures async tasks never overlap. It waits for execution to finish before scheduling the next interval, and supports precise pausing/resuming. This is usually more efficient than node-cron for tasks that don't need scheduling.

import qznt from "qznt";

const heartbeat = new qznt.Loop<string>(async () => {
    return await syncData();
}, qznt.date.parse("10s"));

// Result is automatically inferred as 'string'
heartbeat.on("tick", res => console.log(`Synced: ${res}`));

heartbeat.pause(); // Calculates remaining time in the current cycle
heartbeat.resume(); // Resumes with the exact remaining delay

Advanced Caching & Storage

qznt provides high-performant data persistence and memory management.

  • qznt.Cache: An in-memory TTL cache with Sampled Passive/Active Eviction. It automatically purges expired entries to prevent memory leaks without blocking the event loop.
  • qznt.Storage: A persistent cache. It automatically uses localStorage in browsers and falls back to local JSON files in Node.js environments. Think a mini, smart-Redis cache.
// Cache with a 1-minute global TTL
const userCache = new qznt.Cache<UserData>(60000);
userCache.set("user_1", data);

// Persistent storage (Browser or Node)
const settings = new qznt.Storage("app_settings");
settings.set("theme", "dark");

Seedable Randomness

Every random utility in qznt.rnd accepts an optional seed. This allows you to generate predictable random data for testing, games, or procedural generation.

// Always returns the same item for seed 12345
const item = qznt.rnd.choice(["Sword", "Shield", "Potion"], 12345);

Object Merging

A deep, recursive merge that maintains type safety across multiple sources.

const config = qznt.obj.merge(defaultConfig, userConfig, envOverrides);

Type Guards

The qznt.is namespace provides predicates that act as type guards, ensuring type safety across your app.

if (qznt.is.today(user.lastLogin)) {
    console.log("Welcome back!");
}

if (qznt.is.empty(results)) {
    return "No data found";
}

Type-Safe Transformations

The qznt.to and qznt.arr namespaces also provide ✨ exquisite ✨ ways to transform data structures while maintaining type safety.

const userRecord = qznt.to.record(usersArray, u => ({
    key: u.id,
    value: { name: u.username, active: qznt.is.today(u.lastLogin) }
}));

👀 Mentionables

  • Zero Dependencies: Lightweight and fast.
  • Tree-Shakable: Only bundle the functions you actually use.
  • Strictly Typed: Deep inference for everything from EventEmitter results to object paths.
  • Node & Browser: Optimized for Node.js but safe for modern browsers.

👋 About

Built by @xsqu1znt as a core library for my projects. Published for anyone to use.

License: MIT