wikijs-fork/server/helpers/common.js
2018-07-08 01:12:43 -04:00

19 lines
335 B
JavaScript

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
}
}
}