New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

slugify-plus

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slugify-plus

A customizable and scalable slug generator for Node.js with TypeScript support

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

🏆 Slugify-Plus - The Ultimate Slug Generator for Node.js 🚀

npm contributors

Slugify-Plus is an advanced, customizable, and developer-friendly slug generator for Node.js and JavaScript applications.
It helps create SEO-friendly URLs, unique identifiers, database keys, and human-readable slugs for various use cases.

🔥 Key Features

  • 🌍 Supports multiple languages (transliteration for non-Latin characters).
  • 🔠 Converts text into URL-safe slugs.
  • 🎨 Customizable separators (-, _, |, .).
  • 🚀 Removes common stop words for better readability.
  • 🔢 Supports max-length truncation to fit database constraints.
  • 🔄 Auto-appends unique IDs if a duplicate exists.
  • 🔑 CLI Support for command-line usage.

🎯 Why Use Slugify-Plus Over Other Slug Generators?

FeatureSlugify-Plus ✅Other Libraries ❌
Multi-language Support✅ Yes❌ Limited
Custom Separators✅ Yes❌ No
Stop Word Removal✅ Yes❌ No
Database Friendly✅ Yes❌ No
Unique ID Handling✅ Yes❌ No
CLI Support✅ Yes❌ No
TypeScript Support✅ Yes❌ No

📦 Installation

Install the package via npm or yarn:

# Using npm
npm install slugify-plus

# Using yarn
yarn add slugify-plus

🚀 Usage Guide

1️⃣ Basic Slug Generation

const { slugify } = require("slugify-plus");

console.log(slugify("Hello World!")); 
// Output: hello-world

2️⃣ Custom Separator

console.log(slugify("Hello World!", { separator: "_" })); 
// Output: hello_world

3️⃣ Stop Word Removal

console.log(slugify("The Quick Brown Fox", { removeStopWords: true })); 
// Output: quick-brown-fox

4️⃣ Limit Slug Length

console.log(slugify("This is a very long title", { maxLength: 10 })); 
// Output: this-is-a

5️⃣ CLI Support

npx slugify-plus "Hello World!"
# Output: hello-world

🌍 Open Source Contribution

Slugify-Plus is open source and welcomes contributions from developers worldwide. 💜

🛠 How to Contribute?

  • Fork the Repository on GitHub.
  • Clone the Repository
    git clone https://github.com/imankii01/slugify-plus.git
    cd slugify-plus
    
  • Install Dependencies
    npm install
    
  • Create a New Branch
    git checkout -b feature-new-slug-format
    
  • Make Your Changes & Commit
    git commit -m "Added new slug format feature"
    
  • Push Changes & Create a Pull Request
    git push origin feature-new-slug-format
    
  • Submit a PR on GitHub 🚀

💡 Use Cases

  • 📌 SEO Optimization - Generate SEO-friendly URLs automatically.
  • 🔑 Database & File Naming - Avoid spaces in filenames & database keys.
  • 🌐 CMS & Blogging Platforms - Convert titles into clean slugs.
  • 📂 Short URLs & Usernames - Generate readable & shareable links.

🎉 Support the Project

If you find this package useful, consider supporting me:

Buy Me a Coffee
Star this project on GitHub

📄 License

This project is licensed under the MIT License.

Keywords

slug

FAQs

Package last updated on 14 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts