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

@developaul/string-utils

v0.2.1

Published

A comprehensive string manipulation utility library

Readme

@developaul/string-utils

A comprehensive string manipulation utility library built with TypeScript for modern JavaScript applications.

Features

  • 🚀 Modern ESM support with full TypeScript types
  • 📦 Multiple entry points for tree-shaking optimization
  • 🔧 Comprehensive utilities for string formatting and validation
  • 💪 Fully typed with excellent IDE support
  • 🎯 Zero dependencies - lightweight and fast

Installation

npm install @developaul/string-utils
# or
pnpm add @developaul/string-utils
# or
yarn add @developaul/string-utils

Usage

Basic Import

import { kebabCase, capitalize, isEmail } from '@developaul/string-utils';

// Format strings
const slug = kebabCase('Hello World'); // 'hello-world'
const title = capitalize('hello world'); // 'Hello world'

// Validate strings
const valid = isEmail('[email protected]'); // true

Namespace Imports

import { formatters, validators } from '@developaul/string-utils';

// Use formatters
const slug = formatters.slugify('Hello World!'); // 'hello-world'
const camel = formatters.camelCase('hello-world'); // 'helloWorld'

// Use validators
const isValidEmail = validators.isEmail('[email protected]'); // true
const hasLength = validators.hasMinLength('hello', 3); // true

Submodule Imports

// Import only formatters
import { kebabCase, titleCase } from '@developaul/string-utils/formatters';

// Import only validators
import { isEmail, isUrl } from '@developaul/string-utils/validators';

API Reference

Formatters

kebabCase(str: string): string

Convert a string to kebab-case.

kebabCase('Hello World') // 'hello-world'
kebabCase('camelCase') // 'camel-case'

camelCase(str: string): string

Convert a string to camelCase.

camelCase('hello-world') // 'helloWorld'
camelCase('snake_case') // 'snakeCase'

capitalize(str: string): string

Capitalize the first letter of a string.

capitalize('hello world') // 'Hello world'

titleCase(str: string): string

Convert a string to Title Case.

titleCase('hello world') // 'Hello World'
titleCase('the quick brown fox') // 'The Quick Brown Fox'

slugify(str: string): string

Create a URL-friendly slug from a string.

slugify('Hello World!') // 'hello-world'
slugify('The Quick Brown Fox') // 'the-quick-brown-fox'

truncate(str: string, length: number, suffix?: string): string

Truncate a string to a specified length.

truncate('Hello World', 5) // 'Hello...'
truncate('Hello World', 5, '!') // 'Hello!'

Validators

isEmail(str: string): boolean

Check if a string is a valid email address.

isEmail('[email protected]') // true
isEmail('invalid-email') // false

isUrl(str: string): boolean

Check if a string is a valid URL.

isUrl('https://example.com') // true
isUrl('not-a-url') // false

isAlphanumeric(str: string): boolean

Check if a string contains only alphanumeric characters.

isAlphanumeric('abc123') // true
isAlphanumeric('abc-123') // false

isEmpty(str: string): boolean

Check if a string is empty or contains only whitespace.

isEmpty('') // true
isEmpty('   ') // true
isEmpty('hello') // false

hasMinLength(str: string, minLength: number): boolean

Check if a string has a minimum length.

hasMinLength('hello', 3) // true
hasMinLength('hi', 3) // false

matchesPattern(str: string, pattern: RegExp): boolean

Check if a string matches a pattern.

matchesPattern('123', /^\d+$/) // true
matchesPattern('abc', /^\d+$/) // false

Version History

This package follows Semantic Versioning.

Current version: 0.1.0-alpha.0

Contributing

This package is part of the @breaking monorepo for learning package publishing workflows.

License

MIT License - see LICENSE file for details.