
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
capital-case
Advanced tools
The capital-case npm package is used to convert strings into capital case where the first letter of each word is capitalized and spaces are preserved between words. It is particularly useful for formatting text to be more readable or to adhere to stylistic guidelines where capital case is required.
Convert string to capital case
This feature allows you to convert any lowercase or mixed case string into capital case, where each word starts with a capital letter and all other letters are lower case.
const { capitalCase } = require('capital-case');
const result = capitalCase('string to convert');
console.log(result); // 'String To Convert'
The title-case package also converts strings to a title format similar to capital-case. However, title-case is more focused on adhering to title capitalization rules in English, which can involve more complex rules about which words to capitalize in titles and headings.
This package is a comprehensive string transformation library that includes functions for various case transformations including capital case, lower case, upper case, and more. It offers more versatility compared to capital-case, which is specialized for capital case conversion only.
Transform into a space separated string with each word capitalized.
npm install capital-case --save
import { capitalCase } from "capital-case";
capitalCase("string"); //=> "String"
capitalCase("dot.case"); //=> "Dot Case"
capitalCase("PascalCase"); //=> "Pascal Case"
capitalCase("version 1.2.10"); //=> "Version 1 2 10"
The function also accepts options
.
MIT
FAQs
Transform into a space separated string with each word capitalized
The npm package capital-case receives a total of 4,593,966 weekly downloads. As such, capital-case popularity was classified as popular.
We found that capital-case 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.