The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2013.01.16-21-05'
}).use('gallery-storage-lite', function (Y) {
// For full compatibility with IE 6-7 and Safari 3.x, you should listen for
// the storage-lite:ready event before making storage calls. If you're not
// targeting those browsers, you can safely ignore this step.
Y.StorageLite.on('storage-lite:ready', function () {
// To store an item, pass a key and a value (both strings) to setItem().
Y.StorageLite.setItem('kittens', 'fluffy and cute');
// If you set the optional third parameter to true, you can use any
// serializable object as the value and it will automatically be stored
// as a JSON string.
Y.StorageLite.setItem('pies', ['apple', 'pumpkin', 'pecan'], true);
// To retrieve an item, pass the key to getItem().
Y.StorageLite.getItem('kittens'); // => 'fluffy and cute'
// To retrieve and automatically parse a JSON value, set the optional
// second parameter to true.
Y.StorageLite.getItem('pies', true); // => ['apple', 'pumpkin', 'pecan']
// The length() method returns a count of how many items are currently
// stored.
Y.StorageLite.length(); // => 2
// To remove a single item, pass its key to removeItem().
Y.StorageLite.removeItem('kittens');
// To remove all items in storage, call clear().
Y.StorageLite.clear();
});
});
---------- start logs from yogi.stdout.log ---------- yogi [info] using yogi@0.0.65 on node@0.8.17 yogi [info] using module: gallery-storage-lite yogi [info] prepping grover tests yogi [bail] seems this module does not have tests, you should add some :) ---------- end logs from yogi.stdout.log ---------- ---------- start logs from shifter.stdout.log ---------- shifter [info] revving up shifter [info] looking for build.json file shifter [info] found build.json file, shifting shifter [info] putting the hammer down, let's build this thing! shifter [info] munging in loader meta data into build.json shifter [info] putting the hammer down shifter [info] shifting into gear for gallery-storage-lite shifter [info] deleting build dir: /build/gallery-storage-lite shifter [queu] writing RAW file shifter [queu] compressing gallery-storage-lite/gallery-storage-lite.js with UglifyJS shifter [queu] writing -min file shifter [info] shifting for coverage shifter [queu] coverage file read, starting coverage for: gallery-storage-lite/gallery-storage-lite.js shifter [info] istanbul providing coverage shifter [queu] instrumenting with istanbul shifter [queu] writing coverage file to gallery-storage-lite/gallery-storage-lite-coverage.js shifter [info] done racing, the gears are toast shifter [info] finished in 0.828 seconds, pretty fast huh? ---------- end logs from shifter.stdout.log ---------- ---------- start logs from shifter.stderr.log ---------- shifter [err] /src/gallery-storage-lite/js/storage-lite.js contains 7 lint errors #1: 'json' is defined but never used. getItem: function (key, json) { return null; }, // line 116, pos 33 #2: 'key' is defined but never used. getItem: function (key, json) { return null; }, // line 116, pos 27 #3: 'key' is defined but never used. removeItem: function (key) {}, // line 132, pos 30 #4: 'value' is defined but never used. setItem: function (key, value) {} // line 144, pos 34 #5: 'key' is defined but never used. setItem: function (key, value) {} // line 144, pos 27 #6: 'json' is defined but never used. getItem: function (key, json) { // line 232, pos 37 #7: 'json' is defined but never used. setItem: function (key, value, json) { // line 253, pos 44 ---------- end logs from shifter.stderr.log ---------- ---------- start logs from yogi.stderr.log ---------- no data logged ---------- end logs from yogi.stderr.log ----------
All code on this site is licensed under the BSD License unless stated otherwise.