MCPcopy
hub / github.com/autoNumeric/autoNumeric / formSubmitJsonFormatted

Method formSubmitJsonFormatted

src/AutoNumeric.js:3495–3503  ·  view source on GitHub ↗

* Generate a JSON string with the current formatted values from the ` ` elements, and pass it to the given callback. * Under the hood, the array is generated via a call to `formJsonFormatted()`. * * @param {function} callback * @returns {AutoNumeric}

(callback)

Source from the content-addressed store, hash-verified

3493 * @returns {AutoNumeric}
3494 */
3495 formSubmitJsonFormatted(callback) { //FIXME test this
3496 if (AutoNumericHelper.isFunction(callback)) {
3497 callback(this.formJsonFormatted());
3498 } else {
3499 AutoNumericHelper.throwError(`The given callback is not a function.`);
3500 }
3501
3502 return this;
3503 }
3504
3505 /**
3506 * Generate a JSON string with the localized strings values from the `<input>` elements, and pass it to the given callback.

Callers 1

Calls 3

formJsonFormattedMethod · 0.95
isFunctionMethod · 0.80
throwErrorMethod · 0.80

Tested by

no test coverage detected