forked from 0x2620/oxjs
minor fixes and documentation updates
This commit is contained in:
parent
baf0f72912
commit
ebc6efffb4
11 changed files with 15 additions and 6 deletions
|
|
@ -123,10 +123,13 @@ Ox.load = function() {
|
|||
|
||||
/*@
|
||||
Ox.localStorage <o> localStorage wrapper
|
||||
() -> <o> key:value pairs
|
||||
(key) -> <*> value
|
||||
(key, val) -> <f> localStorage object
|
||||
({key, val}) -> <f> localStorage object
|
||||
(namespace) -> <f> localStorage object for a given namespace
|
||||
FIXME: there is a bug in Ox.doc here,
|
||||
will use "(namespace)" as function name
|
||||
() -> <o> returns all key:value pairs
|
||||
(key) -> <*> returns one value
|
||||
(key, val) -> <f> sets one value, returns localStorage object
|
||||
({key: val, ...}) -> <f> sets values, returns localStorage object
|
||||
@*/
|
||||
Ox.localStorage = function(namespace) {
|
||||
if (!window.localStorage) {
|
||||
|
|
@ -161,6 +164,7 @@ Ox.localStorage = function(namespace) {
|
|||
keys.forEach(function(key) {
|
||||
delete localStorage[namespace + '.' + key];
|
||||
});
|
||||
return storage;
|
||||
};
|
||||
return storage;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue