Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

camelcase-css

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camelcase-css

Convert a kebab-cased CSS property into a camelCased DOM property.

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is camelcase-css?

The camelcase-css npm package is designed to convert CSS property names from kebab-case to camelCase. This is particularly useful when working with CSS in JavaScript, such as when using inline styles in React components or when manipulating CSS properties through JavaScript. By converting CSS property names to camelCase, it aligns with the JavaScript naming conventions and allows for a more seamless integration of CSS styles within JavaScript code.

What are camelcase-css's main functionalities?

Converting CSS property names

This feature allows you to convert any CSS property from kebab-case to camelCase. For example, if you have a CSS property like 'margin-top', using camelcase-css, you can easily convert it to 'marginTop' which is the format expected by JavaScript for setting CSS properties.

"margin-top" => "marginTop"

Batch conversion of CSS properties

In addition to converting individual CSS property names, camelcase-css can also handle objects containing multiple CSS properties. This is particularly useful when you have an object representing a style (e.g., for inline styles in React) and you need to ensure all property names are in camelCase.

{ 'margin-top': '20px', 'text-align': 'center' } => { marginTop: '20px', textAlign: 'center' }

Other packages similar to camelcase-css

Keywords

FAQs

Package last updated on 11 Aug 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc