MCPcopy Index your code
hub / github.com/autoNumeric/autoNumeric / getNumericString

Method getNumericString

src/AutoNumeric.js:2482–2495  ·  view source on GitHub ↗

* Return the unformatted value as a string. * This can also return `null` if `rawValue` is null. * * @usage anElement.getNumericString(); * * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric o

(callback = null)

Source from the content-addressed store, hash-verified

2480 * @returns {string|null}
2481 */
2482 getNumericString(callback = null) {
2483 let result;
2484 if (AutoNumericHelper.isNull(this.rawValue)) {
2485 result = null;
2486 } else {
2487 // Always return a numeric string
2488 // The following statement gets rid of the trailing zeros in the decimal places since the current method does not pad decimals
2489 result = AutoNumericHelper.trimPaddedZerosFromDecimalPlaces(this.rawValue);
2490 }
2491
2492 this._executeCallback(result, callback);
2493
2494 return result;
2495 }
2496
2497 /**
2498 * Return the current formatted value of the AutoNumeric element as a string

Callers 9

getMethod · 0.95
getNumberMethod · 0.95
unformatMethod · 0.95
isPristineMethod · 0.95
_onPasteMethod · 0.95
getNumericStringFunction · 0.80
constructorMethod · 0.80

Calls 4

_executeCallbackMethod · 0.95
_getMethod · 0.95
isNullMethod · 0.80

Tested by 1

getNumericStringFunction · 0.64