to-int.js 294 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 import absFloor from './abs-floor'; export default function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; }