MCPcopy
hub / github.com/autoNumeric/autoNumeric / isZeroOrHasNoValue

Method isZeroOrHasNoValue

src/AutoNumericHelper.js:555–557  ·  view source on GitHub ↗

* Return `true` if the formatted or unformatted numeric string represent the value 0 (ie. '0,00 €'), or is empty (' €'). * This works since we test if there are any numbers from 1 to 9 in the string. If there is none, then the number is zero (or the string is empty). * * @param {strin

(numericString)

Source from the content-addressed store, hash-verified

553 * @returns {boolean}
554 */
555 static isZeroOrHasNoValue(numericString) {
556 return !(/[1-9]/g).test(numericString);
557 }
558
559 /**
560 * Return the negative version of the value (represented as a string) given as a parameter.

Callers 3

setMethod · 0.80
_addGroupSeparatorsMethod · 0.80
_initialCaretPositionMethod · 0.80

Calls 1

testMethod · 0.80

Tested by

no test coverage detected