
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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 6,204,645 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.