mirror of https://github.com/Requarks/wiki.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
335 B
18 lines
335 B
module.exports = {
|
|
/**
|
|
* Get default value of type
|
|
*
|
|
* @param {any} type primitive type name
|
|
* @returns Default value
|
|
*/
|
|
getTypeDefaultValue (type) {
|
|
switch (type.toLowerCase()) {
|
|
case 'string':
|
|
return ''
|
|
case 'number':
|
|
return 0
|
|
case 'boolean':
|
|
return false
|
|
}
|
|
}
|
|
}
|