jQuerypluginsui

slugify – Slugify a String with Javascript

slugify is a javascript library to slugify string. It's useful for URLs, filenames, and IDs.

Usage:

slugify('I ♥ Dogs');  //=> 'i-love-dogs'
slugify(' Déjà Vu! '); //=> 'deja-vu'
slugify('fooBar 123 $#%'); //=> 'foo-bar-123'
slugify('BAR and baz', {separator: '_'}); //=> 'bar_and_baz'

The current page is the site's「Google AMP」 View and comment please click:Full Version »

Since this article was not written in the Markdown format editor, the converted page may not conform to the AMP standard.