Apply new format to snippets and template

This commit is contained in:
Angelos Chalaris
2020-09-15 16:28:04 +03:00
parent 040efd4380
commit 53c16dbf65
401 changed files with 969 additions and 950 deletions

View File

@ -5,8 +5,8 @@ tags: string,intermediate
Converts a string from camelcase.
Use `String.prototype.replace()` to remove underscores, hyphens, and spaces and convert words to camelcase.
Omit the second argument to use a default `separator` of `_`.
- Use `String.prototype.replace()` to remove underscores, hyphens, and spaces and convert words to camelcase.
- Omit the second argument to use a default `separator` of `_`.
```js
const fromCamelCase = (str, separator = '_') =>
@ -20,4 +20,4 @@ const fromCamelCase = (str, separator = '_') =>
fromCamelCase('someDatabaseFieldName', ' '); // 'some database field name'
fromCamelCase('someLabelThatNeedsToBeCamelized', '-'); // 'some-label-that-needs-to-be-camelized'
fromCamelCase('someJavascriptProperty', '_'); // 'some_javascript_property'
```
```