module.exports.is_valid_integer_list = async (list, callback) => {
var s = list.split(',');
for (var i = 0; i < s.length; i++) {
if (!this.is_valid_integer(s[i])) {
return false;
}
}
return true;
}
module.exports.is_valid_integer = async (s, callback) => {
if (Number.isInteger(s)) {
return true;
} else {
return false;
}
}
When I run this code it through the error.
“Number.isInteger is not a function”