Node.js package to create uri safe names from strings
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helpers
test
.gitignore
.gjslintrc
.jshintignore
.jshintrc
.travis.yml
LICENSE.md
README.md
index.js
package.json

README.md

URI Name Build Status

URI Name is a simple package that will take a generic string and produce a string that is safe to use as a URI component.

Usage

$ npm install uriname
var uriname = require('uriname')

//normal title
var title = 'My Fancy Title'
var uri = uriname(title)
console.log(uri) //my-fancy-title

//user input
var title = 'Something 0=&*(&) reaLLy c*(*)()l'
var uri = uriname(title)
console.log(uri) //something-0-really-c-l

//process multiples easily
var titles = ['Something Neat','Really Nice']
var uris = uriname(titles)
console.log(uris) ['something-neat','really-nice']

//enjoy!

Changelog

0.2.0

  • Initial release