Socket
Socket
Sign inDemoInstall

camel-case

Package Overview
Dependencies
3
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    camel-case

Camel case a string


Version published
Weekly downloads
17M
increased by5.62%
Maintainers
1
Install size
36.5 kB
Created
Weekly downloads
 

Readme

Source

Camel Case

NPM version NPM downloads Build status Test coverage

Camel case a string. Explicitly adds a single underscore between groups of numbers to maintain readability and reversibility (E.g. 1.20.5 becomes 1_20_5, not 1205), by default.

Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will result in an empty string.

Installation

Node

npm install camel-case --save

Usage

var camelCase = require('camel-case')

camelCase('string')         //=> "string"
camelCase('dot.case')       //=> "dotCase"
camelCase('PascalCase')     //=> "pascalCase"
camelCase('version 1.2.10') //=> "version1_2_10"

camelCase('STRING 1.2', 'tr') //=> "strıng1_2"

camelCase('string 1 2 3', null, true) //=> "string123"

License

MIT

Keywords

FAQs

Last updated on 21 Oct 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc