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 🙏

© 2025 – Pkg Stats / Ryan Hefner

letterizejs

v2.0.1

Published

Wrap single letters in HTML nodes.

Downloads

352

Readme

Letterize.js

A javascript front-end library for wrapping single letters into HTML nodes (i.e. <span></span>). Made to make text animations easier and simplify letter by letter animation with libraries like Anime.js.

Visit letterizejs.com and checkout some animated examples.

Version 2.0 is out. Moved project to typescript, added types declaration file and added to npm repository. :smile:

BREAKING CHANGES: majority of methods are now read-only properties

Installation

Install with npm or yarn

npm install letterizejs --save
yarn add letterizejs

Download /lib/letterize.min.js file into your project and include it in your HTML document:

<script src="/path/to/letterize.min.js"></script>

or use cdn version:

<script src="https://www.jsdelivr.com/package/npm/letterizejs"></script>

Usage

import Letterize from "letterizejs"
const example = new Letterize({targets: ".selector", options...});

Options

targets: (String) required

A javascript selector. All letters inside these elements will be wrappet in HTML nodes (by default in <span></span>)

examples:

targets: "#sampleId",
targets: ".sampleClass",
targets: "h2",
targets: document.querySelector("h2"),
targets: document.getElementById("#sampleId")

wrapper: (String) (default: "span")

A html tag name that we want to wrap elements into. Default value is "span"

example:

wrapper: "div",

className: (String)

A class name that has to be set on all letters wrapper element.

example:

className: "letter",

Methods and properties

Letterize.targets [read-only] (Array, NodeList, HTMLCollection, HTMLElement, String) – returns an array of targets

Letterize.wrapper [read-only] (String) – returns a name of letters' wrapper node. (i.e. "span")

Letterize.className [read-only] String – returns a class name set on letters' wrappers

Letterize.list [read-only] Array – returns an array of arrays. Each of inner arrays corresponds to each target element and contains all wrapper elements with letters. It can be used to animate letters in each target simultaneously.

Letterize.listAll [read-only] Array – returns an array of all wrapper elements with letters without any division. Usefor for animating all targets one after another, or for other operations made on all letters.

Letterize.deletterize() – Removes all wrapper elements created in initialization and sets all properties to undefined.

TODOs

  • Get feedback, improve, share :wink: