Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
hyphenate-style-name
Advanced tools
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.
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
We found that hyphenate-style-name demonstrated a healthy version release cadence and project activity because the last version was released less than 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.