MCPcopy
hub / github.com/autoNumeric/autoNumeric / formArrayLocalized

Method formArrayLocalized

src/AutoNumeric.js:3270–3279  ·  view source on GitHub ↗

* Return an array containing an object for each form element. * Those objects are of the following structure `{ name: foo, value: '42' }`, where the `name` is the DOM element name, and the `value` is the localized numeric string. * * @param {null|string} forcedOutputFormat If

(forcedOutputFormat = null)

Source from the content-addressed store, hash-verified

3268 * @returns {Array}
3269 */
3270 formArrayLocalized(forcedOutputFormat = null) {
3271 let outputFormatToUse;
3272 if (AutoNumericHelper.isNull(forcedOutputFormat)) {
3273 outputFormatToUse = this.settings.outputFormat;
3274 } else {
3275 outputFormatToUse = forcedOutputFormat;
3276 }
3277
3278 return this.constructor._serializeLocalizedArray(this.form(), this.settings.serializeSpaces, outputFormatToUse);
3279 }
3280
3281 /**
3282 * Return a JSON string containing an object representing the form input values.

Callers 3

formJsonLocalizedMethod · 0.95

Calls 3

formMethod · 0.95
isNullMethod · 0.80

Tested by

no test coverage detected