Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
npm install ustring
var ustring = require('ustring')
ustring.toLowerFirst('ABC') == 'aBC'
ustring.toUpperFirst('abc') == 'Abc'
ustring.hyphenate('ThisIsMyWord') == 'this-is-my-word'
ustring.humanize('This_is-a-very-long-sentence') == 'This is a very long sentence'
ustring.camelize('This-is-a-very-long-word') == 'ThisIsAVeryLongWord'
ustring.endsWith('hello world','world') == true
ustring.endsWith('hello world','wor') == false
ustring.endsWith(123, 3) == true
ustring.is.alphanum('abcd09') == true
ustring.is.alphanum('abcd09#%#$') == false
ustring.is.match(/^[a-zA-Z0-9]+$/, 'abcd09') == true
ustring.is.match(/^[a-zA-Z0-9]+$/, 'abcd09#%#$') == false
Since match is a curried fn, you can even write
var matches = ustring.is.match(/^[a-zA-Z0-9]+$/)
matches('abc')
ustring.is.email('me@test.com') == true
ustring.is.email('myemail.com') == false
make
MIT
FAQs
String utility functions
We found that ustring demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.