Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rexxars/hyphenate-style-name
Hyphenates a camelcased CSS property name
https://github.com/rexxars/hyphenate-style-name
Last synced: 11 days ago
JSON representation
Hyphenates a camelcased CSS property name
- Host: GitHub
- URL: https://github.com/rexxars/hyphenate-style-name
- Owner: rexxars
- License: bsd-3-clause
- Created: 2015-08-03T08:40:53.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-09-23T22:58:23.000Z (about 2 months ago)
- Last Synced: 2024-10-11T07:13:05.096Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 544 KB
- Stars: 35
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# hyphenate-style-name
[![npm version](http://img.shields.io/npm/v/hyphenate-style-name.svg?style=flat-square)](https://www.npmjs.com/package/hyphenate-style-name)[![npm](https://img.shields.io/npm/dm/hyphenate-style-name.svg?style=flat-square)](https://www.npmjs.com/package/hyphenate-style-name)[![npm bundle size](https://img.shields.io/bundlephobia/minzip/hyphenate-style-name.svg?style=flat-square)](https://bundlephobia.com/result?p=hyphenate-style-name)
Hyphenates a camelcased CSS property name. For example:
- `backgroundColor` => `background-color`
- `MozTransition` => `-moz-transition`
- `msTransition` => `-ms-transition`
- `color` => `color`# Installation
```bash
$ npm install --save hyphenate-style-name
```# Usage
```js
import hyphenateStyleName from 'hyphenate-style-name'console.log(hyphenateStyleName('MozTransition')) // -moz-transition
```# License
BSD-3-Clause licensed. See LICENSE.