2.0.3 • Published 4 years ago
@dawidjasiczek/url-friendlier v2.0.3
url-friendlier
Make your string url friendly.
Instalation
npm install @dawidjasiczek/url-friendlier
Usage
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