MCPcopy
hub / github.com/autoNumeric/autoNumeric / _setPersistentStorageName

Method _setPersistentStorageName

src/AutoNumeric.js:6250–6258  ·  view source on GitHub ↗

* Generate the name for the persistent stored data variable * @private

()

Source from the content-addressed store, hash-verified

6248 * @private
6249 */
6250 _setPersistentStorageName() {
6251 if (this.settings.saveValueToSessionStorage) {
6252 if (this.domElement.name !== '' && !AutoNumericHelper.isUndefined(this.domElement.name)) {
6253 this.rawValueStorageName = `${this.storageNamePrefix}${decodeURIComponent(this.domElement.name)}`;
6254 } else {
6255 this.rawValueStorageName = `${this.storageNamePrefix}${this.domElement.id}`;
6256 }
6257 }
6258 }
6259
6260 /**
6261 * Save the raw Value into sessionStorage or a cookie depending on what the browser is supporting.

Callers 1

constructorMethod · 0.95

Calls 1

isUndefinedMethod · 0.80

Tested by

no test coverage detected