1.2.0 ENABLE.persistStorage

Functions for cross-domain persistent storage. Data stored can be accessed from different domains while Javascript localStorage is per domain basis.

Methods

static ENABLE.persistStorage.clear () {Object}

Remove all stored values.

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS

static ENABLE.persistStorage.getItem (Key) {Object}

Return stored item associated with key provided.

Name Type Description
Key String

key for looking up value

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS
result Boolean | String | Number value associated with the key, null when not found

static ENABLE.persistStorage.removeItem (Key) {Object}

Remove stored value associated with key provided.

Name Type Description
Key String

key for looking up value

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or ENABLE.status.INVALID_ARGUMENT

static ENABLE.persistStorage.setItem (Key, Value) {Object}

Update/Store the item associate with key provided.

Name Type Description
Key String

key to be associated with for looking up value

Value Boolean | String | Number

value to be updated or/and stored.

Since:
  • 1.0.0
Returns:
Name Type Description
object Object
Name Type Description
status_code String ENABLE.status.SUCCESS or ENABLE.status.INVALID_ARGUMENT