toPositive.js 92 B

123
  1. module.exports = function toPositive(number) {
  2. return number < 0 ? 0 : (+number || 0);
  3. };