starso
v1.0.2
Published
A lightweight string utility library
Maintainers
Readme
starso
A lightweight string utility library for JavaScript.
Features
slugify: Converts a string to a URL-friendly slugsmartTrim: Removes extra spaces and trims the stringmaskPhone: Masks part of a phone number, keeping the first 2 and last 3 digits visiblemaskEmail: Masks part of an email username, keeping the domain visible
Installation
npm install starsoUsage
const { slugify,smartTrim,maskphone,maskmail } = require('starso');
console.log(slugify("Hello World!")); // "hello-world"
console.log(smartTrim(" Hello World ")); // Hello World
console.log(maskphone("987654321")); //98****321
console.log(maskmail("[email protected]")); //dd2*****@gmail.comLicense
MIT
