mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Update ObjectUtils.js
This commit is contained in:
parent
a00e1a07a0
commit
487c2375f6
1 changed files with 2 additions and 2 deletions
|
@ -203,11 +203,11 @@ export default {
|
|||
|
||||
toFlatCase(str) {
|
||||
// convert snake, kebab, camel and pascal cases to flat case
|
||||
return this.isNotEmpty(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
||||
return this.isNotEmpty(str) && this.isString(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
||||
},
|
||||
|
||||
toCapitalCase(str) {
|
||||
return this.isNotEmpty(str) ? str[0].toUpperCase() + str.slice(1) : str;
|
||||
return this.isNotEmpty(str) && this.isString(str) ? str[0].toUpperCase() + str.slice(1) : str;
|
||||
},
|
||||
|
||||
isEmpty(value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue