Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
lodash.kebabcase
Advanced tools
The lodash.kebabcase package is a utility function that converts a given string to kebab-case. Kebab-case is a string format where words are lowercased and separated by hyphens.
Basic Conversion
This feature converts a simple string with spaces into kebab-case.
const kebabCase = require('lodash.kebabcase');
console.log(kebabCase('Hello World')); // Output: 'hello-world'
Conversion with Special Characters
This feature handles special characters and converts them into kebab-case.
const kebabCase = require('lodash.kebabcase');
console.log(kebabCase('Hello_World!')); // Output: 'hello-world'
Conversion with Mixed Case
This feature converts camelCase strings into kebab-case.
const kebabCase = require('lodash.kebabcase');
console.log(kebabCase('helloWorld')); // Output: 'hello-world'
The change-case package provides a variety of string case transformations, including kebab-case. It is more versatile than lodash.kebabcase as it supports multiple case transformations like camelCase, snake_case, and more.
The param-case package is specifically designed to convert strings to kebab-case. It is similar to lodash.kebabcase but is more focused and lightweight, making it a good alternative if you only need kebab-case conversion.
The to-case package offers multiple string case transformations, including kebab-case. It is similar to change-case but with a simpler API, making it easier to use for basic transformations.
The lodash method _.kebabCase
exported as a Node.js module.
Using npm:
$ {sudo -H} npm i -g npm
$ npm i --save lodash.kebabcase
In Node.js:
var kebabCase = require('lodash.kebabcase');
See the documentation or package source for more details.
FAQs
The lodash method `_.kebabCase` exported as a module.
The npm package lodash.kebabcase receives a total of 4,457,429 weekly downloads. As such, lodash.kebabcase popularity was classified as popular.
We found that lodash.kebabcase 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.