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

char-code-at

v0.0.1

Published

Get the char codes for any string passed in.

Readme

Table of Contents

char-code-at

A simple npm package to get the ASCII character codes of any string.

Installation

npm install char-code-at

Usage

CLI Tool

char-code-at can be used as a CLI tool. Most simply:

λ char-code-at Hi

CHAR: "H"               CHAR CODE: 72
CHAR: "i"               CHAR CODE: 105

You can also pass in whitespace:

λ char-code-at "Hi, world"

CHAR: "H"               CHAR CODE: 72
CHAR: "i"               CHAR CODE: 105
CHAR: ","               CHAR CODE: 44
CHAR: " "               CHAR CODE: 32
CHAR: "w"               CHAR CODE: 119
CHAR: "o"               CHAR CODE: 111
CHAR: "r"               CHAR CODE: 114
CHAR: "l"               CHAR CODE: 108
CHAR: "d"               CHAR CODE: 100

The --start or -s flag indicates the first index that will be analyzed:

λ char-code-at Hello -s 2

CHAR: "l"               CHAR CODE: 108
CHAR: "l"               CHAR CODE: 108
CHAR: "o"               CHAR CODE: 111

Conversely, the --end or -e flag indicates the last index that will be analyzed:

λ char-code-at Hello -e 2

CHAR: "H"               CHAR CODE: 72
CHAR: "e"               CHAR CODE: 101
CHAR: "l"               CHAR CODE: 108

Use both flags together to narrow your results even further:

λ char-code-at "Hi, world" -s 4 -e 5

CHAR: "w"               CHAR CODE: 119
CHAR: "o"               CHAR CODE: 111

Package

Access char-code-at functionality from your JavaScript or TypeScript code. To start, require the package:

const charCodeAt = require('../char-code-at');

Then, in your code pass in 1. The string to analyze, 2. The first index to analyze, and 3. The last index to analyze.

charCodeAt.printCharCodes("Hi, world", 4, 5);