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

Method formSubmitJsonLocalized

src/AutoNumeric.js:3513–3521  ·  view source on GitHub ↗

* Generate a JSON string with the localized strings values from the ` ` elements, and pass it to the given callback. * Under the hood, the array is generated via a call to `formJsonLocalized()`. * * @param {function} callback * @param {null|string} forcedOutputFormat If set

(callback, forcedOutputFormat = null)

Source from the content-addressed store, hash-verified

3511 * @returns {AutoNumeric}
3512 */
3513 formSubmitJsonLocalized(callback, forcedOutputFormat = null) { //FIXME test this
3514 if (AutoNumericHelper.isFunction(callback)) {
3515 callback(this.formJsonLocalized(forcedOutputFormat));
3516 } else {
3517 AutoNumericHelper.throwError(`The given callback is not a function.`);
3518 }
3519
3520 return this;
3521 }
3522
3523 /**
3524 * Unformat the given AutoNumeric element, and update the `hoveredWithAlt` variable.

Callers 1

Calls 3

formJsonLocalizedMethod · 0.95
isFunctionMethod · 0.80
throwErrorMethod · 0.80

Tested by

no test coverage detected