localStorage

Protocol bindings for all localStorage operations.

Usage

1
client.localStorage(method[,args]).then(callback);

Parameters

Param Type Details
method String method for storage operation
args
optional
Object/String operation arguments

Example

localStorage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// get the storage item for the given key
client.localStorage('GET', someKey, function(err,res) { ... });

// get all keys of the storage
client.localStorage(function(err,res) { ... });

// set the storage item for the given key
client.localStorage('POST', {key: someKey, value: someValue});

// remove the storage item for the given key
client.localStorage('DELETE', 'someKey');

// clear the storage
client.localStorage('DELETE');