Skip to content

Just a simple, clean and pure functional implementation for creating slugs

License

Notifications You must be signed in to change notification settings

keyvanakbary/slugifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slugifier

Build Status

A full-featured, simple, clean and pure functional implementation for creating slugs. No third party libraries or extensions needed.

Installation

composer require keyvanakbary/slugifier

Usage

use slugifier as s;

s\slugify('JúST å fëw wørds'); // just-a-few-words

s\slugify('Αυτή είναι μια δοκιμή'); // ayti-einai-mia-dokimi

s\slugify('Wikipedia style', '_'); // wikipedia_style

Modifiers

Sometimes the default character map is not accurate enough. Slugifier supports custom modifiers

s\slugify('Pingüino', '-', ['ü' => 'u']); // pinguino

Some language iso code modifiers are supported

s\slugify('Estaĵo', '-', s\MOD['eo']); // estajxo

s\slugify('Örnektir', '-', s\MOD['tr']); // ornektir

About

Just a simple, clean and pure functional implementation for creating slugs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages