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

@sreeshanth_00700/my-string-utils

v1.0.1

Published

A small utility library for common string transformations

Readme

@sreeshuu/my-string-utils

A lightweight, zero-dependency JavaScript utility library for common string transformations, slug generation, and reading time estimation.

Features

  • Slugify: Convert strings into clean, URL-friendly slugs.
  • Title Case: Capitalize the first letter of each word in a phrase.
  • Reading Time: Estimate total reading time and word count based on standard reading speeds.
  • Lightweight: Zero external runtime dependencies.
  • Modern ES Modules: Fully compatible with Node.js ESM.

Installation

Install the package using npm:

npm install @sreeshuu/my-string-utils

Usage

Ensure your project uses ES modules (set "type": "module" in your package.json), then import the utility functions:

import { slugify, titleCase, readingTime } from '@sreeshuu/my-string-utils';

// 1. Convert text to a URL slug
const slug = slugify('Hello World! How Are You?');
console.log(slug); 
// Output: 'hello-world-how-are-you'

// 2. Format a string to Title Case
const title = titleCase('hello from the other side');
console.log(title); 
// Output: 'Hello From The Other Side'

// 3. Estimate reading time
const stats = readingTime('This is a short sample sentence to calculate words and duration.');
console.log(stats);
// Output: { words: 10, minutes: 1, text: '1 min read' }

API Reference

slugify(text)

  • Parameters: text (string) — The raw text string.
  • Returns: string — A lowercase, URL-safe hyphenated string.

titleCase(text)

  • Parameters: text (string) — The text to convert.
  • Returns: string — Capitalized words.

readingTime(text, [wpm=200])

  • Parameters:
    • text (string) — The body text.
    • wpm (number, optional) — Average words per minute (defaults to 200).
  • Returns: object — { words: number, minutes: number, text: string }.

License

MIT