Files
DefinitelyTyped/lscache/lscache-tests.ts
Steve 3245bf72b4 Updated LS cache typings (#12290)
* Updated LS cache typings

* bump version
2016-11-01 21:19:45 +09:00

16 lines
341 B
TypeScript

// Copied examples directly from lscache github site with slight modifications
alert(lscache.supported());
lscache.enableWarnings(true);
lscache.set('greeting', 'Hello World!', 2);
alert(lscache.get('greeting'));
lscache.remove('greeting');
lscache.set('data', { 'name': 'Pamela', 'age': 26 }, 2);
alert(lscache.get('data').name);