Comparing version 1.0.2 to 1.1.0
@@ -6,3 +6,7 @@ 'use strict'; | ||
if (str.length === 1 || !(/[_.\- ]+/).test(str) ) { | ||
return str; | ||
if (str[0] === str[0].toLowerCase() && str.slice(1) !== str.slice(1).toLowerCase()) { | ||
return str; | ||
} | ||
return str.toLowerCase(); | ||
} | ||
@@ -9,0 +13,0 @@ |
{ | ||
"name": "camelcase", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -43,4 +43,9 @@ # camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) | ||
## Related | ||
See [`decamelize`](https://github.com/sindresorhus/decamelize) for the inverse. | ||
## License | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3028
4
16
51