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

Method formSubmitJsonNumericString

src/AutoNumeric.js:3478–3486  ·  view source on GitHub ↗

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

(callback)

Source from the content-addressed store, hash-verified

3476 * @returns {AutoNumeric}
3477 */
3478 formSubmitJsonNumericString(callback) { //FIXME test this
3479 if (AutoNumericHelper.isFunction(callback)) {
3480 callback(this.formJsonNumericString());
3481 } else {
3482 AutoNumericHelper.throwError(`The given callback is not a function.`);
3483 }
3484
3485 return this;
3486 }
3487
3488 /**
3489 * Generate a JSON string with the current formatted values from the `<input>` elements, and pass it to the given callback.

Callers 1

Calls 3

formJsonNumericStringMethod · 0.95
isFunctionMethod · 0.80
throwErrorMethod · 0.80

Tested by

no test coverage detected