0.1.1 • Published 9 years ago

pretty-url v0.1.1

Weekly downloads
8
License
-
Repository
-
Last release
9 years ago

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