MCPcopy
hub / github.com/autoNumeric/autoNumeric / isNegativeStrict

Method isNegativeStrict

src/AutoNumericHelper.js:532–534  ·  view source on GitHub ↗

* Return `true` if the given string contains a negative sign on the first character (on the far left). * * @example isNegativeStrict('1234.56') => false * @example isNegativeStrict('1234.56-') => false * @example isNegativeStrict('-1234.56') => true * @example isNe

(numericString, negativeSignCharacter = '-')

Source from the content-addressed store, hash-verified

530 * @returns {boolean}
531 */
532 static isNegativeStrict(numericString, negativeSignCharacter = '-') {
533 return numericString.charAt(0) === negativeSignCharacter;
534 }
535
536 /**
537 * Return `true` if the very first character is the opening bracket, and if the rest of the `valueString` also has the closing bracket.

Callers 9

isNegativeMethod · 0.95
setRawNegativeSignMethod · 0.95
parseStrMethod · 0.95
_addGroupSeparatorsMethod · 0.80
_onPasteMethod · 0.80
_onWheelMethod · 0.80
_formatValueMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected