I want to validate every input using xss module in nodejs But when I input 0 (number), it return empty string.
var xss = require('xss');
console.log(xss(0)); //return empty string
console.log(xss('0')); //return 0
console.log(xss(5)); //return 5
Could anyone guide that what is the reason behind this?
via yusufaw
No comments:
Post a Comment