code: function ToInteger(num) {
          var n = +num;
          if (isActualNaN(n)) {
              n = 0;
          } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
              n = (n > 0 || -1) * Math.floor(Math.abs(n));
          }
          return n;
      }
docs: ES5 9.4 http://es5.github.com/#x9.4 http://jsperf.com/to-integer /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger