Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
lodash.capitalize
Advanced tools
The lodash.capitalize npm package is a utility function from the Lodash library, specifically designed for capitalizing the first letter of a string while converting the rest of the string to lower case. This is particularly useful for formatting user input for display purposes.
String Capitalization
This feature capitalizes the first letter of the provided string and makes all other letters lowercase. It's useful for names, titles, or any case where proper capitalization is required.
const _ = require('lodash.capitalize');
console.log(_.capitalize('hello world')); // 'Hello world'
The 'capitalize' package offers similar functionality to lodash.capitalize, allowing for capitalization of the first letter of a string. Unlike lodash.capitalize, it also provides options to capitalize every word in a string, making it more versatile for different capitalization needs.
The 'titleize' npm package goes a step further by capitalizing the first letter of every word in a string, which is ideal for titles or headings. This makes it slightly more comprehensive than lodash.capitalize when dealing with multiple words.
The lodash method _.capitalize
exported as a Node.js module.
Using npm:
$ {sudo -H} npm i -g npm
$ npm i --save lodash.capitalize
In Node.js:
var capitalize = require('lodash.capitalize');
See the documentation or package source for more details.
FAQs
The lodash method `_.capitalize` exported as a module.
We found that lodash.capitalize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.