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.
hyphenate-style-name
Advanced tools
Package description
The hyphenate-style-name package is a small, focused utility designed for converting JavaScript style object keys from camelCase to hyphenated-case. This is particularly useful when working with CSS in JavaScript solutions, where you might need to convert style objects into a format that can be used directly in stylesheets or inline styles.
Hyphenating Style Names
Converts JavaScript style object keys from camelCase (e.g., 'marginLeft') to hyphenated-case (e.g., 'margin-left'). This is useful for dynamically generating CSS styles in JavaScript.
"marginLeft" => "margin-left"
Similar to hyphenate-style-name, camelcase-css converts CSS property names between camelCase and hyphenated-case. While hyphenate-style-name focuses on converting from camelCase to hyphenated-case, camelcase-css offers conversion in both directions, making it a bit more flexible depending on the user's needs.
change-case is a more comprehensive string manipulation library that includes functionality for transforming strings into various cases, including camel case, snake case, kebab case, and more. Compared to hyphenate-style-name, which is specialized for style names, change-case offers a broader range of string manipulation tools, making it suitable for a wider variety of applications beyond just CSS property names.
Readme
Hyphenates a camelcased CSS property name. For example:
backgroundColor
=> background-color
MozTransition
=> -moz-transition
msTransition
=> -ms-transition
color
=> color
$ npm install --save hyphenate-style-name
var hyphenateStyleName = require('hyphenate-style-name')
console.log(hyphenateStyleName('MozTransition')) // -moz-transition
BSD-3-Clause licensed. See LICENSE.
FAQs
Hyphenates a camelcased CSS property name
The npm package hyphenate-style-name receives a total of 4,139,422 weekly downloads. As such, hyphenate-style-name popularity was classified as popular.
We found that hyphenate-style-name 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.