NodeStore.deleteFromStorage()

Delete a key-value pair from the persistent data store. This is compatible with PhoneGap/Cordova

This machinepack provides an easy-to-use key/value pair-based database using the HTML5 localStorage model. With some HTTP requests you should be able to effectively use this as a replacement for cookies on PhoneGap/Cordova-based apps.

Usage

Hover over inputs/exits for more info.

var NodeStore = require('machinepack-nodestore');


// Delete a key-value pair from the persistent data store. This is compatible with PhoneGap/Cordova

NodeStore.deleteFromStorage({

key: 'users',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// No value was found the provided key.

notFound: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

key required

The name of the key you wish to delete.

'users'

Exits

error

An unexpected error occurred.

notFound

No value was found the provided key.

success

OK.

'Returned Value'