Gathering detailed insights and metrics for kebab-case
Gathering detailed insights and metrics for kebab-case
Gathering detailed insights and metrics for kebab-case
Gathering detailed insights and metrics for kebab-case
param-case
Transform into a lower cased string with dashes between words
change-case
Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others
just-kebab-case
convert a string to kebab case
case-anything
camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)
Convert a string to kebab-case, i.e. its dash separated form
npm install kebab-case
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
24 Stars
12 Commits
4 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Apr 11, 2025
Latest Version
2.0.2
Package Id
kebab-case@2.0.2
Unpacked Size
5.92 kB
Size
2.43 kB
File Count
5
NPM Version
10.8.2
Node Version
20.19.0
Published on
Apr 11, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
Convert a string to kebab-case, i.e. its dash separated form
The difference between kebab-case
and e.g. dashify
is that this
module doesn't modify the string in any other way than transforming uppercased letters to their lowercased
counterparts prefixed with -
. Thanks to this there's also a reverse
function to
do the opposite, i.e. get back the original value.
This is used in Unistyle to transform JavaScript CSS properties
to their CSS counterparts without losing a possible browser prefix, e.g: WebkitTransform -> -webkit-transform
.
Install kebab-case
using npm:
1npm install --save kebab-case
1import kebabCase from "kebab-case"; 2 3kebabCase("WebkitTransform"); 4// "-webkit-transform" 5kebabCase.reverse("-webkit-transform"); 6// "WebkitTransform" 7kebabCase("WebkitTransform", false); 8// "webkit-transform"
kebabCase(str)
Name | Type | Description |
---|---|---|
str | String | The string to convert |
keepLeadingDash | Boolean | Whether to keep the leading dash or not. Default is true . |
Returns: String
, the kebab cased string.
kebabCase.reverse(str)
Name | Type | Description |
---|---|---|
str | String | The string to convert back |
Returns: String
, the "unkebab cased" string.
MIT © Joakim Carlstein
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/12 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More