Satisfy eslint rule no-useless-escape
This commit is contained in:
parent
80aca59af7
commit
830ca4f17f
2 changed files with 9 additions and 9 deletions
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
function toDbKey(key) {
|
||||
return key.
|
||||
replace(/[^a-z0-9\-_]/gi, '').
|
||||
replace(/\-+/g, '_').
|
||||
replace(/-+/g, '_').
|
||||
replace(/[A-Z]/g, c => '_' + c.toLowerCase()).
|
||||
replace(/^_+|_+$/g, '').
|
||||
replace(/_+/g, '_').
|
||||
|
@ -50,7 +50,7 @@ function fromDbKey(key) {
|
|||
prefix = '_';
|
||||
|
||||
}
|
||||
return prefix + key.replace(/[_\-]([a-z])/g, (m, c) => c.toUpperCase());
|
||||
return prefix + key.replace(/[_-]([a-z])/g, (m, c) => c.toUpperCase());
|
||||
}
|
||||
|
||||
function convertKeys(obj, options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue