case-anything
Advanced tools
Comparing version
{ | ||
"name": "case-anything", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "description": "camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)", |
@@ -144,2 +144,22 @@ # Case anything 🐫 | ||
### Keep only certain special characters | ||
Instead of removing all special characters, you can opt to keep some special characters. | ||
In the example below we see: | ||
- input: `$cat-dog` | ||
- desired output: `$CatDog` | ||
```js | ||
pascalCase('$cat-dog', { keepSpecialCharacters: false }) | ||
// CatDog → not what we want | ||
pascalCase('$cat-dog', { keepSpecialCharacters: true }) | ||
// $Cat-Dog → not what we want | ||
pascalCase('$cat-dog', { keep: ['$'] }) | ||
// $CatDog → desired output | ||
``` | ||
### Convert special characters into alphabet | ||
@@ -146,0 +166,0 @@ |
46133
1.04%243
8.97%