Socket
Socket
Sign inDemoInstall

camelcase

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camelcase - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

license

6

index.js

@@ -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 @@

2

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc