1.0.0 • Published 5 months ago

slugify-plus v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

šŸ† 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?

  1. Fork the Repository on GitHub.
  2. Clone the Repository
    git clone https://github.com/imankii01/slugify-plus.git
    cd slugify-plus
  3. Install Dependencies
    npm install
  4. Create a New Branch
    git checkout -b feature-new-slug-format
  5. Make Your Changes & Commit
    git commit -m "Added new slug format feature"
  6. Push Changes & Create a Pull Request
    git push origin feature-new-slug-format
  7. 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.

1.0.0

5 months ago