PHPackages                             nash-ye/nslug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nash-ye/nslug

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nash-ye/nslug
=============

Yet another unicode slug generator library.

v0.1.1(9y ago)3234GPL-3.0+PHPPHP &gt;=5.5

Since Oct 16Pushed 9y ago2 watchersCompare

[ Source](https://github.com/nash-ye/nslug)[ Packagist](https://packagist.org/packages/nash-ye/nslug)[ Docs](https://github.com/nash-ye/nslug)[ RSS](/packages/nash-ye-nslug/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

nSlug
=====

[](#nslug)

[![Latest Stable Version](https://camo.githubusercontent.com/06cc429d835abe3baeb803d6ace31a5d5c88feb24018d70ce08e6975a9c7fe32/68747470733a2f2f706f7365722e707567782e6f72672f6e6173682d79652f6e736c75672f762f737461626c65)](https://packagist.org/packages/nash-ye/nslug)[![Total Downloads](https://camo.githubusercontent.com/d29b41e2676884560a39f8da8b57476fd8e5511ccf6b5ae501b39c3c9575a6b0/68747470733a2f2f706f7365722e707567782e6f72672f6e6173682d79652f6e736c75672f646f776e6c6f616473)](https://packagist.org/packages/nash-ye/nslug)[![License](https://camo.githubusercontent.com/5e529a510e3bdc02fd6d73ccf67d278179fa895f3de3e827f114472482b10595/68747470733a2f2f706f7365722e707567782e6f72672f6e6173682d79652f6e736c75672f6c6963656e7365)](https://packagist.org/packages/nash-ye/nslug)

Yet another unicode slug generator library.

Usage
-----

[](#usage)

```
use NSlug\SlugGenerator;

$options = [
    'limit'     => null,
    'delimiter' => '-',
    'lowercase' => true,
];

$slugGenerator = new SlugGenerator($options);

// English strings.
echo $slugGenerator->generate('Hello World'); // Prints 'hello-world'.
echo $slugGenerator->generate('Life is too short!'); // Prints 'life-is-too-short'.

// Arabic strings.
echo $slugGenerator->generate('صباح جميل'); // Prints 'صباح-جميل'.
echo $slugGenerator->generate('مساء الخير'); // Prints 'مساء-الخير'.
```

Options
-------

[](#options)

- `limit` int|null The characters limit to truncate, default `null`.
- `delimiter` string The delimiter, default `-`.
- `lowercase` bool Convert to lower-case?, default `true`.

Installation
------------

[](#installation)

The supported way of installing nSlug is via Composer.

```
$ composer require nash-ye/nslug
```

Requirements
------------

[](#requirements)

nSlug requires PHP 5.5+.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3494d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87d1a16a387f40e98c0195a51d277d413bc80b04453954f01bd477d697435257?d=identicon)[nash-ye](/maintainers/nash-ye)

---

Top Contributors

[![nash-ye](https://avatars.githubusercontent.com/u/4238321?v=4)](https://github.com/nash-ye "nash-ye (5 commits)")

---

Tags

phpphp-libraryslugunicode

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nash-ye-nslug/health.svg)

```
[![Health](https://phpackages.com/badges/nash-ye-nslug/health.svg)](https://phpackages.com/packages/nash-ye-nslug)
```

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[ausi/slug-generator

Slug Generator

8002.2M22](/packages/ausi-slug-generator)[voku/portable-utf8

Portable UTF-8 library - performance optimized (unicode) string functions for php.

52322.4M40](/packages/voku-portable-utf8)[joypixels/emoji-toolkit

JoyPixels is a complete set of emoji designed for the web. The emoji-toolkit includes libraries to easily convert unicode characters to shortnames (:smile:) and shortnames to JoyPixels emoji images. PNG formats provided for the emoji images.

465817.1k7](/packages/joypixels-emoji-toolkit)[instasent/sms-counter-php

SMS Counter PHP Class Library which detects encoding of an SMS message text, counts the characters as per the encoding and gives page limit information.

491.3M4](/packages/instasent-sms-counter-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
