A Storage-like object. Requires only setItem, getItem, removeItem and
clear methods of standard Storage type to be defined.
Calls underlying clear function.
Success or failure result.
clear function did throw an error then a failure result
containing an object with storageError property set to thrown value will be returned.clear function did not throw an error then a success result
containing an undefined value will be returned.Calls underlying getItem function with key argument, JSON.parses the received value and
validates the result.
underlying getItem argument
validating transform, if validation fails it it should return FailureResult and
SuccessResult otherwise
Success or failure result.
getItem function did throw an error then a failure result containing
an object with key and storageError property set to thrown value will be returned.key does not exist a failure result containing an object with key and
keyNotExistError properties will be returned.key and mapError property set to thrown value will be returned.key and validationError property
set to validation error will be returned.Calls underlying removeItem function with key argument.
underlying removeItem argument
Success or failure result.
removeItem function did throw an error then a failure result
containing an object with key and storageError property set to thrown value will be
returned.removeItem function did not throw an error then a success result
containing an undefined value will be returned.Calls underlying setItem function with key and JSON.stringifyed value.
underlying setItem first argument
underlying setItem second argument
Success or failure result.
setItem function did throw an error then a failure result
containing an object with key and storageError property set to thrown value will be
returned.setItem function did not throw an error then a success result
containing an undefined value will be returned.Generated using TypeDoc
Creates a
storageMapfrom third-partyStorageobject.