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

Method _addBrackets

src/AutoNumeric.js:5060–5066  ·  view source on GitHub ↗

* Add the bracket types specified in the `settings` object, to the given string `value`. * * @param {string} value * @param {object} settings * @returns {string} * @private

(value, settings)

Source from the content-addressed store, hash-verified

5058 * @private
5059 */
5060 static _addBrackets(value, settings) {
5061 if (AutoNumericHelper.isNull(settings.negativeBracketsTypeOnBlur)) {
5062 return value;
5063 }
5064
5065 return `${settings.firstBracket}${value.replace(settings.negativeSignCharacter, '')}${settings.lastBracket}`;
5066 }
5067
5068 /**
5069 * Remove the bracket types specified in the `settings` object, from the given string `value`.

Callers 1

Calls 1

isNullMethod · 0.80

Tested by

no test coverage detected