MCPcopy
hub / github.com/autoNumeric/autoNumeric / isInt

Method isInt

src/AutoNumericHelper.js:186–188  ·  view source on GitHub ↗

* Return `true` if the parameter is an integer (and not a float). * * @param {*} n * @returns {boolean}

(n)

Source from the content-addressed store, hash-verified

184 * @returns {boolean}
185 */
186 static isInt(n) {
187 return typeof n === 'number' && parseFloat(n) === parseInt(n, 10) && !isNaN(n);
188 }
189
190 /**
191 * Return `true` if the parameter is a function.

Callers 2

_parseStyleRulesMethod · 0.80
validateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected