Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
akiomik committed Oct 23, 2015
1 parent a098802 commit 1cc18b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ bower install --save chrome-storage-promise
## Usage

```js
// set
chrome.storage.promise.local.set({'foo': 'bar'}).then(function() {
// resolved
console.log('set');
}, function(error) {
// rejected
console.log(error);
});

// get
chrome.storage.promise.local.get('foo').then(function(items) {
// resolved
console.log(items); // => {'foo': 'bar'}
}, function(error) {
// rejected
console.log(error);
});
```

Expand Down

0 comments on commit 1cc18b4

Please sign in to comment.