29 lines
1.1 KiB
Markdown
29 lines
1.1 KiB
Markdown
# hyphenate-style-name
|
|
|
|
[](http://browsenpm.org/package/hyphenate-style-name)[](https://travis-ci.org/rexxars/hyphenate-style-name)[](https://codeclimate.com/github/rexxars/hyphenate-style-name)[](https://codeclimate.com/github/rexxars/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
|
|
var hyphenateStyleName = require('hyphenate-style-name');
|
|
|
|
console.log(hyphenateStyleName('MozTransition')); // -moz-transition
|
|
```
|
|
|
|
# License
|
|
|
|
BSD-3-Clause licensed. See LICENSE.
|