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

@jts-studios/utils

v0.1.1

Published

Small utility helpers for JavaScript projects

Readme

JTS Utils

Small utility helpers for JavaScript projects.

Install

npm install @jts-studios/utils

Usage

import { wait, clamp, markdownToHtml } from "@jts-studios/utils"

await wait(250)
console.log(clamp(12, 0, 10))
console.log(await markdownToHtml("# Hello"))

Import Patterns (Intuitive API)

You can import utilities in two clean ways.

1) Root imports (best default)

import { wait, fetchText, markdownToHtml, clamp, setTheme, initTheme } from "@jts-studios/utils"

2) Subpath imports (when you want very explicit module targeting)

import { wait } from "@jts-studios/utils/async"
import { fetchText } from "@jts-studios/utils/file"
import { markdownToHtml } from "@jts-studios/utils/markdown"
import { clamp } from "@jts-studios/utils/math"
import { setTheme } from "@jts-studios/utils/theme"
import { initTheme } from "@jts-studios/utils/theme-init"

Utility Reference

Async

  • wait(ms: number): Promise<void>

File / Network

  • fetchText(url: string, init?: RequestInit): Promise<string>

Markdown

  • markdownToHtml(markdown: string): Promise<string>

Math

  • clamp(value: number, min: number, max: number): number

Theme (Browser)

  • setTheme(theme: string): void
  • initTheme(defaultTheme = "dark"): void

Project Structure

jts-utils/
    src/
        index.js              # package root entrypoint + barrel exports
        async.js
        file.js
        markdownToHtml.js
        math.js
        themes.js
        themes_init.js

Publishing Wiki

This section is a full guide for publishing and maintaining this package on npm.

Current Package

  • Name: @jts-studios/utils
  • Registry: https://registry.npmjs.org/
  • Visibility: public

One-Time Setup (Per Machine)

  1. Install Node.js LTS and npm.
  2. Verify tooling:
node -v
npm -v
  1. Login to npm:
npm login
  1. Confirm account:
npm whoami

Standard Release Flow

  1. Make your code changes.
  2. Bump package version in package.json:
npm version patch

Use one of these depending on release type:

  • patch → bug fixes (0.1.00.1.1)
  • minor → backward-compatible features (0.1.00.2.0)
  • major → breaking changes (0.1.01.0.0)
  1. Build package:
npm run build
  1. Check publish contents:
npm run pack:check
  1. Publish:
npm publish

Auth Options for Publish

If your npm account enforces stronger security, use one of these:

Option A: OTP publish

npm publish --otp=123456

Option B: Granular token (CI or local automation)

Create a granular npm token with package publish permissions and (if required) 2FA bypass for publishing.

npm config set //registry.npmjs.org/:_authToken YOUR_TOKEN
npm publish
npm config delete //registry.npmjs.org/:_authToken

Pre-Publish Checklist

  • npm whoami returns the expected account
  • package name/scope is owned by your account or org
  • version has not already been published
  • build passes (npm run build)
  • tarball looks correct (npm run pack:check)

Verify a Release

npm view @jts-studios/utils version

Then test in another project:

npm install @jts-studios/utils

Common Errors and Fixes

  • ENEEDAUTH:
    • Run npm login and retry.
  • E403 (2FA/token policy issue):
    • Use --otp, or use a granular token configured for publishing.
  • E404 on scoped publish:
    • Scope/package access is wrong for current account.
    • Confirm with npm whoami and publish under a scope you own.
  • You cannot publish over the previously published versions:
    • Increment version before publishing.

Security Best Practices

  • Never commit tokens to git.
  • Use short-lived or granular tokens when possible.
  • Revoke any token that was exposed in logs/chat.

Notes

  • Package name and scope must exist on npm and be owned by your npm account/org.
  • For first publish of a scoped package, publishConfig.access is set to public in package.json.