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

Method setRawNegativeSign

src/AutoNumericHelper.js:566–572  ·  view source on GitHub ↗

* Return the negative version of the value (represented as a string) given as a parameter. * The numeric string is a valid Javascript number when typecast to a `Number`. * * @param {string} value * @returns {*}

(value)

Source from the content-addressed store, hash-verified

564 * @returns {*}
565 */
566 static setRawNegativeSign(value) {
567 if (!this.isNegativeStrict(value, '-')) {
568 return `-${value}`;
569 }
570
571 return value;
572 }
573
574 /**
575 * Replace the character at the position `index` in the string `string` by the character(s) `newCharacter`.

Callers 1

_onPasteMethod · 0.80

Calls 1

isNegativeStrictMethod · 0.95

Tested by

no test coverage detected