pretty-url

0.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i pretty-url

Weekly Downloads

2

Version

0.1.1

License

none

Last publish

Collaborators

  • said