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

@a95z/slugify

v1.0.1

Published

A utility function to convert a string into a URL-friendly slug, with support for string sanitization, normalization, and transformation.

Readme

@a95z/slugify - Documentation

A utility function to convert a string into a URL-friendly slug with support for string sanitization, normalization, and transformation. This package is designed to create slugs from text for usage in URLs, making it easy to ensure your slugs are clean, readable, and SEO-friendly.

Features

  • Supports ASCII characters only: Automatically normalizes characters and removes any unwanted symbols.
  • URL-friendly: Converts spaces to dashes, removes special characters, and ensures the string is lowercase.
  • Optimized for TypeScript: Fully typed with TypeScript support to integrate seamlessly into your codebase.
  • Works with ESM and CommonJS: Flexible exports for both modern and legacy systems.

Installation

You can install @a95z/slugify via npm, yarn, or pnpm.

Using npm:

npm install @a95z/slugify

Using yarn:

yarn add @a95z/slugify

Using pnpm:

pnpm add @a95z/slugify

Usage

Once installed, you can import the slugify function into your project.

Example

import { slugify } from '@a95z/slugify';

const text = 'Hello World! This is a test.';
const slug = slugify(text);
console.log(slug); // Output: "hello-world-this-is-a-test"

Development

To contribute to this package or make changes locally, you'll need to clone the repository and install the dependencies.

Clone the repository:

git clone https://github.com/a95z/slugify.git
cd slugify

Install dependencies:

Using pnpm (recommended):

pnpm install

Run the tests:

We use Vitest for testing. To run the tests, use the following command:

pnpm install

Format the code:

To ensure your code is properly formatted, use the prettier command:

pnpm format:fix

Lint the code:

You can run TypeScript type-checking with:

pnpm lint

Contributing

We welcome contributions! Please fork the repository and submit a pull request. Before submitting, ensure you run the tests and format the code according to the project standards.

Steps:

  1. Fork the repository.
  2. Clone your fork locally.
  3. Create a feature branch: git checkout -b feature-branch-name.
  4. Make your changes.
  5. Run tests to make sure everything works.
  6. Commit your changes with clear, concise messages.
  7. Push to your fork and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

For a list of changes, please refer to the CHANGELOG.


This package is created and maintained by Abdurezak Farah (abdurezak.com, Twitter (X)).