Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
kebab-case
Advanced tools
Readme
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:
npm install --save kebab-case
var kebabCase = require("kebab-case");
kebabCase("WebkitTransform");
// "-webkit-transform"
kebabCase.reverse("-webkit-transform");
// "WebkitTransform"
kebabCase(str)
Name | Type | Description |
---|---|---|
str | String | The string to convert |
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
FAQs
Convert a string to kebab-case, i.e. its dash separated form
The npm package kebab-case receives a total of 185,741 weekly downloads. As such, kebab-case popularity was classified as popular.
We found that kebab-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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.