Elementals.js

Latest Version: 3.7 Final 20 December 2018

Method String.toCamel

Calling Convention:
String.toCamel([delimiter])
Parameters:
delimiter optional, default "-"
The character to be stripped from the string where the next character will be converted to upper-case.
Returns:
A string result where delimiter has been removed, the next letter capitolized.

Example #1, no delimiter

JavaScript
var jsName = "quick-test-variable";
console.log(jsName.toCamel());
Output
quickTestVariable

Example #2, with delimiter

JavaScript
var jsName = "quick-test+variable";
console.log(jsName.toCamel('+'));
Output
quick-testVariable

Elementals String Methods

Elementals Extensions

Polyfills

These link to the Mozilla Developer Network (MDN)

Property Key

  • Object
  • Method or Variable
  • "Constant" Variable

Downloads

Advertisement