to-camel-case
Advanced tools
Comparing version 0.2.1 to 1.0.0
@@ -0,1 +1,9 @@ | ||
1.0.0 - January 21, 2016 | ||
------------------------ | ||
* drop component support | ||
* cleanup readme | ||
* add travis ci | ||
* update coding style | ||
0.2.1 - October 3, 2013 | ||
@@ -19,2 +27,2 @@ ----------------------- | ||
-------------------------- | ||
:sparkles: | ||
:sparkles: |
19
index.js
var toSpace = require('to-space-case'); | ||
var space = require('to-space-case') | ||
/** | ||
* Expose `toCamelCase`. | ||
* Export. | ||
*/ | ||
module.exports = toCamelCase; | ||
module.exports = toCamelCase | ||
/** | ||
@@ -19,7 +17,6 @@ * Convert a `string` to camel case. | ||
function toCamelCase (string) { | ||
return toSpace(string).replace(/\s(\w)/g, function (matches, letter) { | ||
return letter.toUpperCase(); | ||
}); | ||
} | ||
function toCamelCase(string) { | ||
return space(string).replace(/\s(\w)/g, function (matches, letter) { | ||
return letter.toUpperCase() | ||
}) | ||
} |
{ | ||
"name": "to-camel-case", | ||
"version": "1.0.0", | ||
"description": "Convert a string to camel case.", | ||
"repository": "git://github.com/ianstormtaylor/to-camel-case.git", | ||
"license": "MIT", | ||
"version": "0.2.1", | ||
"description": "Convert a string to camel case.", | ||
"keywords": ["camel", "case", "camelcase", "string"], | ||
"dependencies": { | ||
"to-space-case": "0.1.2" | ||
} | ||
} | ||
"to-space-case": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.3.4" | ||
}, | ||
"keywords": [ | ||
"camel", | ||
"case", | ||
"camelcase", | ||
"string" | ||
] | ||
} |
@@ -1,12 +0,16 @@ | ||
# to-camel-case | ||
Convert a string to a camel case. | ||
# to-camel-case [![Build Status](https://travis-ci.org/ianstormtaylor/to-camel-case.svg?branch=master)](https://travis-ci.org/ianstormtaylor/to-camel-case) | ||
Convert a string to a camel case. Part of the series of [case helpers](https://github.com/ianstormtaylor/to-case). | ||
## Installation | ||
$ component install ianstormtaylor/to-camel-case | ||
$ npm install to-camel-case | ||
``` | ||
$ npm install to-camel-case | ||
``` | ||
_Big thanks to [@Nami-Doc](https://github.com/Nami-Doc) for graciously giving up the npm package name :)_ | ||
_Thanks to [@Nami-Doc](https://github.com/Nami-Doc) for graciously giving up the npm package name!_ | ||
## Example | ||
@@ -23,2 +27,3 @@ | ||
## API | ||
@@ -28,6 +33,15 @@ | ||
Returns the camel-case variant of a `string`. | ||
Returns the `string` converted to camel case. | ||
## License | ||
MIT | ||
The MIT License (MIT) | ||
Copyright © 2016, Ian Storm Taylor | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
46
1
1
3906
1
7
48
+ Addedto-no-case@1.0.2(transitive)
+ Addedto-space-case@1.0.0(transitive)
- Removedto-no-case@0.1.1(transitive)
- Removedto-space-case@0.1.2(transitive)
Updatedto-space-case@^1.0.0