Socket
Socket
Sign inDemoInstall

css-to-style

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    css-to-style

Transform a string of css rules into a style object


Version published
Weekly downloads
5.3K
decreased by-21.7%
Maintainers
1
Install size
18.1 kB
Created
Weekly downloads
 

Changelog

Source

v1.4.0 - 2020-11-08

Added

  • Added source maps to build output.

Changed

  • Updated devDependencies.

Readme

Source

css-to-style

Transform a string of css rules into a style object.

Usage

toStyle(cssText);

Parameters

  • cssText string of CSS rules

Return value

An object of CSS rules, where the properties are camelCased.

Example

import toStyle from 'css-to-style';

toStyle('font-size: 2em; color: #f00; margin-top: 4px');
// returns { fontSize: '2em', color: '#f00', marginTop: '4px' }

Keywords

FAQs

Last updated on 08 Nov 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc