Socket
Book a DemoInstallSign in
Socket

slugificate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slugificate

Slugify a string with a character of choice

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 01 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts