all files / popper/utils/ isNumeric.js

100% Statements 1/1
100% Branches 3/3
100% Functions 1/1
100% Lines 1/1
1 2 3 4 5 6 7 8 9 10 11                473×    
/**
 * Tells if a given input is a number
 * @method
 * @memberof Popper.Utils
 * @param {*} input to check
 * @return {Boolean}
 */
export default function isNumeric(n) {
    return (n !== '' && !isNaN(parseFloat(n)) && isFinite(n));
}