fixed key conversion function
This commit is contained in:
parent
f0e772933e
commit
8e5279189a
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ function toDbKey(key) {
|
||||||
return key.
|
return key.
|
||||||
replace(/[^a-z0-9\-_]/gi, '').
|
replace(/[^a-z0-9\-_]/gi, '').
|
||||||
replace(/\-+/g, '_').
|
replace(/\-+/g, '_').
|
||||||
replace(/[A-Z]+/g, c => '_' + c.toLowerCase()).
|
replace(/[A-Z]/g, c => '_' + c.toLowerCase()).
|
||||||
replace(/^_+|_+$/g, '').
|
replace(/^_+|_+$/g, '').
|
||||||
replace(/_+/g, '_').
|
replace(/_+/g, '_').
|
||||||
trim();
|
trim();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue