Naturally Produced Modules
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

slugificate

0.2.1 • Public • Published

slugificate

NPM version build status Test coverage

Slugify a string, removing all non-word characters and replacing them with a character. Defaults to a hypen, but any character can be used.

Installation

$ npm i --save slugificate

Overview

var slugify = require('slugificate');
 
var someString = 'Dogs are larger than Cats, sometimes';
 
var newString = slugify(someString);
//=> 'dogs-are-larger-than-cats-sometimes'
 
var newerString = slugify(someString, '+');
//=> 'dogs+are+larger+than+cats+sometimes'

License

MIT © Yoshua Wuyts

Keywords

none

install

npm i slugificate

Downloadsweekly downloads

0

version

0.2.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability