0.0.2 • Published 10 years ago

slugification v0.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

slugification

Build Status

Transform string into slug. Replaces spaces and special characters.

Installation

npm install slugification

Usage

var slugify = require('slugification');

slugify('What is this?')
// => 'What-is-this'

API

slugification(str, spaceReplacement, specialCharReplacement)

  • str: String to be transformed.
  • spaceReplacement: String or character to replace spaces with. Defaults to '-'.
  • specialCharReplacement: String or character to replace special characters with. Defaults to ''.

Tests

npm install -g mocha

Then

npm test

License

MIT