
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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 5,853,306 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.