• GigglyBobble@kbin.social
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    11 months ago

    And the whole implementation of is-number which is at version 7.0.0:

    module.exports = function(num) {
      if (typeof num === 'number') {
        return num - num === 0;
      }
      if (typeof num === 'string' && num.trim() !== '') {
        return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
      }
      return false;
    };
    
    

    The node.js ecosystem has always been madness.