string-text-formatter
Format string text for seo friendly url slug, seo friendly url slug with unique id
Install
$ npm install --save string-text-formatter
Usage
import * as text from 'string-text-formatter';
const str = 'What is Lorem Ipsum?';
const lowerCaseString = text.lowerCase(str);
console.log(lowerCaseString);
const upperCaseString = text.upperCase(str);
console.log(upperCaseString);
const convertedString = text.convertString(str,'_');
console.log(convertedString);
const urlSlug = text.urlSlug(str);
console.log(convertedString);
const urlSlugUnqiue = text.urlSlugUnqiue(str);
console.log(urlSlugUnqiue);
const string1 = text.randomString(12, false);
console.log(string1);
const string2 = text.randomString(12, true);
console.log(string1);