2.0.3 • Published 5 years ago
@dawidjasiczek/url-friendlier v2.0.3
url-friendlier
Make your string url friendly.
Instalation
npm install @dawidjasiczek/url-friendlierUsage
Require:
const uF = require('@dawidjasiczek/url-friendlier')Example
// Example string
let sc = "   . Special polish ąóź and ggerman öæß characters             ------hello"
console.log("String before change: ", sc ,"\n") 
console.log("String after change:", uF.friendly(sc),"\n")
console.log("String after change, skipped special chars:", uF.friendly(sc, true),"\n")Example output:
String before change:     . Special polish ąóź and ggerman öæß characters             ------hello 
String after change: -special-polish-aoz-and-ggerman-oeaess-characters-hello 
String after change, skip special chars: -special-polish-and-ggerman-characters-hello