pretty-url
v0.1.1
Published
Don't ever worry about generating slugs!
Downloads
4
Readme
Pretty URL
Pretty URL allows you to generate slugs based on strings very easily.
Installation
npm install pretty-url
Usage
Below is an example of how to use the pretty-url module within an Express app.
var express = express();
var prettyUrl = require('pretty-url');
var app = express();
app.get('/', function(req, res) {
var str = "Hello World!";
res.send(prettyUrl.slug(str)); // returns hello-world
});
app.listen(3000);
Tests
Tests are written with the Mocha framework and the Expect.js module. To run tests, place yourself at the root of the module and run :
mocha