MCPcopy
hub / github.com/autoNumeric/autoNumeric / unformatAndSet

Method unformatAndSet

src/AutoNumeric.js:4601–4606  ·  view source on GitHub ↗

* Unformat the given DOM element value, and set the resulting value back as the element value. * * @param {HTMLElement|HTMLInputElement} domElement * @param {object} options * @returns {*}

(domElement, options = null)

Source from the content-addressed store, hash-verified

4599 * @returns {*}
4600 */
4601 static unformatAndSet(domElement, options = null) { //FIXME test this
4602 const unformattedValue = this.unformat(domElement, options);
4603 AutoNumericHelper.setElementValue(domElement, unformattedValue);
4604
4605 return unformattedValue;
4606 }
4607
4608 /**
4609 * Unformat and localize the given formatted string with the given options. This returns a numeric string.

Callers

nothing calls this directly

Calls 2

unformatMethod · 0.95
setElementValueMethod · 0.80

Tested by

no test coverage detected