param value param strict returns export function isNumber ( value , strict ? ) { strict = strict === undefined ? true : strict ; const digitRegex = /^\-?\d+$/ ; if ( typeof value === 'number' ) { return true ; } else { if ( strict ) { return ( '' + value ) . match ( digitRegex ) !== null ; } else { return ! isNaN ( parseInt ( value ) ) ; } } }