mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor #4103 - Update lifecycle names in Base* files
This commit is contained in:
parent
2572561902
commit
63b5b8be8e
6 changed files with 71 additions and 33 deletions
|
@ -201,11 +201,15 @@ export default {
|
|||
return null;
|
||||
},
|
||||
|
||||
convertToFlatCase(str) {
|
||||
toFlatCase(str) {
|
||||
// convert snake, kebab, camel and pascal cases to flat case
|
||||
return this.isNotEmpty(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str;
|
||||
},
|
||||
|
||||
toCapitalCase(str) {
|
||||
return this.isNotEmpty(str) ? str[0].toUpperCase() + str.slice(1) : str;
|
||||
},
|
||||
|
||||
isEmpty(value) {
|
||||
return value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0) || (!(value instanceof Date) && typeof value === 'object' && Object.keys(value).length === 0);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue