Skip to content

Commit 062c673

Browse files
committed
v1.0.1
1 parent cb3b8d8 commit 062c673

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ language: node_js
22
node_js:
33
- "0.10"
44
- "0.12"
5-
- "iojs"
5+
- "4"
6+
- "5"
67
script: npm test

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# camelcase-css [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][david-image]][david-url]
2+
23
> Convert a dash-separated CSS property to a camelCased DOM property.
34
45

56
## Installation
67
[Node.js](http://nodejs.org/) `>= 0.10` is required. Type this at the command line:
78
```shell
8-
npm install camelcase-css --save-dev
9+
npm install camelcase-css
910
```
1011

1112

1213
## Usage
1314
```js
1415
var camelCaseCSS = require("camelcase-css");
1516

16-
camelCaseCSS("-webkit-border-radius"); //=> WebkitBorderRadius
17-
camelCaseCSS("-moz-border-radius"); //=> MozBorderRadius
18-
camelCaseCSS("-ms-border-radius"); //=> msBorderRadius
19-
camelCaseCSS("border-radius"); //=> borderRadius
17+
camelCaseCSS("-webkit-border-radius"); //-> WebkitBorderRadius
18+
camelCaseCSS("-moz-border-radius"); //-> MozBorderRadius
19+
camelCaseCSS("-ms-border-radius"); //-> msBorderRadius
20+
camelCaseCSS("border-radius"); //-> borderRadius
2021
```
2122

2223

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ function callback(dashChar, char)
1212

1313
function camelCaseCSS(property)
1414
{
15+
// NOTE :: IE8's "styleFloat" is intentionally not supported
16+
if (property === "float") return "cssFloat";
17+
1518
/*
1619
Microsoft vendor-prefixed properties are camel cased
1720
differently than other browsers:

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "camelcase-css",
33
"description": "Convert a dash-separated CSS property to a camelCased DOM property.",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"license": "MIT",
66
"homepage": "https://github.com/stevenvachon/camelcase-css",
77
"author": {
@@ -17,8 +17,8 @@
1717
"url": "https://github.com/stevenvachon/camelcase-css/issues"
1818
},
1919
"devDependencies": {
20-
"chai": "^3.2.0",
21-
"mocha": "^2.2.5"
20+
"chai": "^3.5.0",
21+
"mocha": "^2.4.5"
2222
},
2323
"engines": {
2424
"node": ">= 0.10"

test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ it("should work", function(done)
1212
expect( camelCaseCSS("-ms-border-radius") ).to.equal("msBorderRadius");
1313
expect( camelCaseCSS("border-radius") ).to.equal("borderRadius");
1414

15+
expect( camelCaseCSS("float") ).to.equal("cssFloat");
16+
1517
done();
1618
});

0 commit comments

Comments
 (0)