cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

to-int.js (282B)


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