@toolsnap/string-utils
v1.0.0
Published
String utility functions - deduplicate, reverse, truncate, repeat, count
Maintainers
Readme
@toolsnap/string-utils
String utility functions.
Installation
npm install @toolsnap/string-utilsUsage
const {reverse, truncate, slugify, count, escapeHtml, initials} = require('@toolsnap/string-utils');
reverse('hello') // 'olleh'
truncate('Long text...', 8) // 'Long te...'
slugify('Hello World!') // 'hello-world'
count('hello hello', 'hello') // 2
escapeHtml('<div>') // '<div>'
initials('John Doe') // 'JD'🔗 More tools at risetop.top
License
MIT
