main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
921 bytes
|
Rev | Line | |
---|
[d565449] | 1 | # hyphenate-style-name
|
---|
| 2 |
|
---|
| 3 | [![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)
|
---|
| 4 |
|
---|
| 5 | Hyphenates a camelcased CSS property name. For example:
|
---|
| 6 |
|
---|
| 7 | - `backgroundColor` => `background-color`
|
---|
| 8 | - `MozTransition` => `-moz-transition`
|
---|
| 9 | - `msTransition` => `-ms-transition`
|
---|
| 10 | - `color` => `color`
|
---|
| 11 |
|
---|
| 12 | # Installation
|
---|
| 13 |
|
---|
| 14 | ```bash
|
---|
| 15 | $ npm install --save hyphenate-style-name
|
---|
| 16 | ```
|
---|
| 17 |
|
---|
| 18 | # Usage
|
---|
| 19 |
|
---|
| 20 | ```js
|
---|
| 21 | import hyphenateStyleName from 'hyphenate-style-name'
|
---|
| 22 |
|
---|
| 23 | console.log(hyphenateStyleName('MozTransition')) // -moz-transition
|
---|
| 24 | ```
|
---|
| 25 |
|
---|
| 26 | # License
|
---|
| 27 |
|
---|
| 28 | BSD-3-Clause licensed. See LICENSE.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.