MCPcopy
hub / github.com/autoNumeric/autoNumeric / isNegativeWithBrackets

Method isNegativeWithBrackets

src/AutoNumericHelper.js:544–546  ·  view source on GitHub ↗

* Return `true` if the very first character is the opening bracket, and if the rest of the `valueString` also has the closing bracket. * * @param {string} valueString * @param {string} leftBracket * @param {string} rightBracket * @returns {boolean}

(valueString, leftBracket, rightBracket)

Source from the content-addressed store, hash-verified

542 * @returns {boolean}
543 */
544 static isNegativeWithBrackets(valueString, leftBracket, rightBracket) {
545 return valueString.charAt(0) === leftBracket && this.contains(valueString, rightBracket);
546 }
547
548 /**
549 * Return `true` if the formatted or unformatted numeric string represent the value 0 (ie. '0,00 €'), or is empty (' €').

Callers 1

_addGroupSeparatorsMethod · 0.80

Calls 1

containsMethod · 0.95

Tested by

no test coverage detected