Skip to content

Instantly share code, notes, and snippets.

@0xae
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xae/76d4b7f81c5f404e9c8f to your computer and use it in GitHub Desktop.
Save 0xae/76d4b7f81c5f404e9c8f to your computer and use it in GitHub Desktop.
// Reset Alojamentos
$localForage.keys().then(function(keys){
keys.forEach(function(k){
if (k.indexOf("RGA::agregado::") != -1 || k.indexOf("RGA::alojamento::") != -1)
$localForage.removeItem(k)
})
})
// Reset Samples
$localForage.keys().then(function(keys){
keys.forEach(function(k){
if (k.indexOf("RGA::edificio::") != -1){
$localForage.getItem(k).then(function(v){
v.attr.alojamentos=0;
$localForage.setItem(k,v);
});
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment