angular-localForage icon indicating copy to clipboard operation
angular-localForage copied to clipboard

Support passing back an object on multi-getItem lookup

Open scotttrinh opened this issue 7 years ago • 0 comments

At the moment, you can get multiple items back from localForage by passing an array to the getItem method. That will return an array of values indexed to the key. It would be nice to be able to support getting back an object with keys, like how $q.all works. Something like:

$localForage.getItem({
  someKey: 'someKey',
  differentObjectKey: 'someOtherKey'
})
  .then(({someKey, differentObjectKey}) => {
    // Do something with someKey and differentObjectKey here
  });

scotttrinh avatar Jul 19 '16 20:07 scotttrinh