Skip to content

Instantly share code, notes, and snippets.

@pid
Created July 19, 2013 13:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pid/6039252 to your computer and use it in GitHub Desktop.
Save pid/6039252 to your computer and use it in GitHub Desktop.
generate slug / speaking url node.js or browser
// http://pid.github.io/speakingurl/
var slug;
var options = {
maintainCase: true,
separator: '_'
};
var mySlug = require('speakingurl').createSlug(options);
slug = mySlug("Bel été !");
console.log(slug); // Output: Bel_ete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment