6 lines
169 B
JavaScript
6 lines
169 B
JavaScript
function helperQueryNumber(value, defaultValue) {
|
|
if (value && !isNaN(value)) return parseInt(value);
|
|
return defaultValue;
|
|
}
|
|
|
|
module.exports = helperQueryNumber; |