Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cool-text-package
Advanced tools
npm
!String.prototype.upperFirst( )
A function that uppercases the first character of string.
i want this capitalized.
I want this capitalized.
String.prototype.lowerFirst( )
A function that lowercases the first character of string.
I like lowercase
i like lowercase
String.prototype.upperWord( )
A function that uppercases the first letter of each word in a string.
I like caps.
I Like Caps.
String.prototype.upperWiggle( )
A function that uppercases every other letter.
I feel All wiggly.
I FeEl aLl wIgGlY.
String.prototype.removeSpaces( )
A function that removes all whitespace from a given string.
try to decode this!
trytodecodethis!
String.prototype.trimSpaces( )
A function that removes only the extra whitespace from a given string (example: “ a b ” → “a b”
).
far out
far out
String.prototype.allCaps( )
A function that makes all characters uppercase. (this is the same as .toUppercase()
).
i like to yell!!
I LIKE TO YELL!!
String.prototype.kababCase( )
A function that removes extra spaces and replaces spaces with the hyphen "-", and makes all characters lowercase.
What is kabab-case anyway
what-is-kabab-case-anyway
String.prototype.snakeCase( )
Removes extra space and replaces spaces with an underscore "_", and makes all characters lowercase.
Snakes are Amazing
snakes_are_amazing
String.prototype.camelCase( )
Lowercases the first character of the first word. Then uppercases the first character of all other words, and removes all spaces.
CAMELS are a special sort of animal.
camelsAreASpecialSortOfAnimal
See Homework 1
Just connect any of those functions to a string and see magic! Note, none of these functions take in a parameter. They are methods.
Example:
let superString =
'wow! this project is soooooooooooo cool. Just amazing. '
console.log(superString.snakeCase())
FAQs
these are amazing utilities that everyone should use.
We found that cool-text-package 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.