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

@natoboram/based.ts

v1.1.0

Published

A TypeScript library for working with arbitrary bases

Readme

@natoboram/based.ts

Node.js CI Docker CI CodeQL Coverage GitHub Pages IPFS GitHub Downloads NPM Downloads JSR Score Dependabot Updates Wakapi CodeRabbit Pull Request Reviews

A TypeScript library for working with arbitrary bases.

CLI

It can be installed globally if you want to convert numbers or generate UUIDs from the terminal.

pnpm add --global @natoboram/based.ts
pnpm add --global jsr:@natoboram/based-ts
Usage: basedts convert [options] <number>

Convert a number from a base in a space to another base in another space

Arguments:
  number                The number to convert

Options:
  --from-base <base>    The base of the number (default: "10")
  --from-space <space>  The space of the number to convert from (default: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/")
  --to-base <base>      The base to convert to (default: "10")
  --to-space <space>    The space to convert the number to (default: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/")
Usage: basedts uuid [options]

Generate a UUID in a different base with a different space than normal UUIDs

Options:
  --base <base>    The base of the UUID to generate (default: "16")
  --space <space>  The space of the UUID to generate (default: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/")
  -h, --help       Display help for command

Library

pnpm add @natoboram/based.ts
pnpm add jsr:@natoboram/based-ts
import { toBase, basedToBigInt } from "@natoboram/based.ts"

// Convert between two bases
const bigInt = basedToBigInt("69", 10n)
const based = toBase(bigInt, 16n)

console.log(based) // 45
import { Based } from "@natoboram/based.ts"

// Perform operations on numbers of different bases
const four = new Based("4", 64n)
const two = new Based("2", 16n)
const result = four.divide(two).to(10n)

console.log(result.value) // 2

License

This Source Code Form is subject to the terms of the Mozilla Public License v2.0. If a copy of the MPL was not distributed with this file, you can obtain one at https://mozilla.org/MPL/2.0.