src/privates/_toInteger.js
function _toInteger (value) {
    var n = +value;

    if (n !== n) { // eslint-disable-line no-self-compare
        return 0;
    } else if (n % 1 === 0) {
        return n;
    } else {
        return Math.floor(Math.abs(n)) * (n < 0 ? -1 : 1);
    }
}
function _toInteger (value) {
    var n = +value;

    if (n !== n) { // eslint-disable-line no-self-compare
        return 0;
    } else if (n % 1 === 0) {
        return n;
    } else {
        return Math.floor(Math.abs(n)) * (n < 0 ? -1 : 1);
    }
}
function _toInteger ( value ) { var n = + value ; if ( n !== n ) { // eslint-disable-line no-self-compare return 0 ; } else if ( n % 1 === 0 ) { return n ; } else { return Math . floor ( Math . abs ( n ) ) * ( n < 0 ? - 1 : 1 ) ; } }
Converts a value to an integer.
@private
@param {*} value
@returns {Number}
Converts a value to an integer .