MCPcopy
hub / github.com/autoNumeric/autoNumeric / isNumber

Method isNumber

src/AutoNumericHelper.js:154–156  ·  view source on GitHub ↗

* Return `true` if the parameter is a number (or a number written as a string). * * @param {*} n * @returns {boolean}

(n)

Source from the content-addressed store, hash-verified

152 * @returns {boolean}
153 */
154 static isNumber(n) {
155 return !this.isArray(n) && !isNaN(parseFloat(n)) && isFinite(n);
156 }
157
158 /**
159 * Return `true` if the given character is a number (0 to 9)

Callers 13

isNumberOrArabicMethod · 0.95
setMethod · 0.80
setUnformattedMethod · 0.80
validateMethod · 0.80
formatMethod · 0.80
unformatMethod · 0.80
_onPasteMethod · 0.80
_toNumericValueMethod · 0.80
AutoNumeric.jsFile · 0.80

Calls 1

isArrayMethod · 0.95

Tested by

no test coverage detected