
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
capitalize capitalize first letter and lowercase others.
capitalize("HELLO WORLD!")
> Hello world!
noSpace remove all spaces.
noSpace("Hel l o w o r l d !")
> Helloworld!
escape remove all non-alphanumeric characters.
escape("Hell_o, = W0r1d!")
> HelloW0r1d
escapeSimple remove all non-alphanumeric characters but preserv spaces.
escapeSimple("Hell_o, = W0r1d!")
> Hello W0r1d
kebab convert string to kebabCase.
kebab(" Hello world")
> hello-world
oneSpace replace multiple spaces with one space.
oneSpace("Hello wolrd")
> Hello world
elaps replace spaces, breaklines and tabs with one space.
elaps("hey this is\n some string")
> hey this is some string
validateURL validate a url, return false or true.
validateURL("hello.co")
validateURL("https://www.npmjs.com/")
validateURL("www.hello.co")
> true
> true
> true
validateURL("www.hello.co-m")
> false
trimTo trim a text to a specific count, takes three params, trimTo(string, count, dotsCount)
trimTo(string, count)
trimTo("hello world", 5)
> hello
if original string length is bigger than or equal to 9 add three dots at the end.
trimTo("123456789", 5, 9)
> 12345...
trimToSimple return an array with two values,
can be usefull creating readmore functionality.
trimToSimple("this is some text", 10)
> [ 'this is so', 'me text' ]
FAQs
Some string manipulation functions that I need to use commonly
The npm package string-wks receives a total of 5 weekly downloads. As such, string-wks popularity was classified as not popular.
We found that string-wks 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.