From 1cc18b4a1132bb2af4e94b6de09df32cad438c65 Mon Sep 17 00:00:00 2001 From: Akiomi Kamakura Date: Sat, 24 Oct 2015 02:25:23 +0900 Subject: [PATCH] updated README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 6390f45..ea5acca 100644 --- a/README.md +++ b/README.md @@ -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); }); ```