All Projects → shuding → sluga

shuding / sluga

Licence: MIT license
Slugify a string. The minimal version.

sluga

Slugify a string

A fork of @sindresorhus/slugify, with ES5 support added and extra options removed.

Install

$ npm install sluga

Usage

const slugify = require('sluga');

slugify('I ♥ Dogs');
//=> 'i-dogs'

slugify('  Déjà Vu!  ');
//=> 'deja-vu'

slugify('fooBar 123 $#%');
//=> 'foo-bar-123'

slugify('я люблю единорогов');
//=> 'ya-lyublyu-edinorogov'

API

slugify(string)

string

Type: string

String to slugify.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].