Skip to content
Converts string/array into websafe-friendly-clean piece of text
JavaScript HTML CSS
Find file
Latest commit b752f7a @juanbrujo Update README.md
Failed to load latest commit information.
demo
dist Add `Å` and `å`
src
.editorconfig First release
.gitignore Initial commit
.jshintrc
.travis.yml First release
Gruntfile.js new v0.1.0
LICENSE
README.md
Sluggin.json now passes jshint test.
bower.json
package.json now passes jshint test.
test.js new v0.1.0

README.md

Sluggin.js

Bower version NPM version CircleCI Build Status

Converts string/array into websafe-friendly-clean piece of text

Install

$ npm install sluggin
$ bower install sluggin

Use

String:

Sluggin( "I used to have ugly text. Now I just have 1." );
➤ i-used-to-have-ugly-text-now-i-just-have-1
Sluggin( "Solía tener texto feo. Ahora sólo tengo 1." );
➤ solia-tener-texto-feo-ahora-solo-tengo-1
Sluggin( "J'ai l'habitude d'avoir un texte laid. Je dois maintenant juste 1." );
➤ jai-lhabitude-davoir-un-texte-laid-je-dois-maintenant-juste-1
Sluggin( "Früher habe ich hässlich Text. Jetzt habe ich nur noch 1." );
➤ fruher-habe-ich-hasslich-text-jetzt-habe-ich-nur-noch-1

Array:

Sluggin( [
    "I used to have ugly text. Now I just have 1.",
    "Solía tener texto feo. Ahora sólo tengo 1.",
    "J'ai l'habitude d'avoir un texte laid. Je dois maintenant juste 1.",
    "Früher habe ich hässlich Text. Jetzt habe ich nur noch 1."
  ] );
➤ [
    "i-used-to-have-ugly-text-now-i-just-have-1", 
    "solia-tener-texto-feo-ahora-solo-tengo-1", 
    "jai-lhabitude-davoir-un-texte-laid-je-dois-maintenant-juste-1", 
    "fruher-habe-ich-hasslich-text-jetzt-habe-ich-nur-noch-1"
  ]

Thanks:

Something went wrong with that request. Please try again.