add Ox.void()
This commit is contained in:
parent
7daf1a23a0
commit
7b13e834a7
1 changed files with 8 additions and 0 deletions
|
@ -52,3 +52,11 @@ Ox.cache = function(fn, options) {
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*@
|
||||||
|
Ox.void <f> Returns nothing and calls options callback without arguments
|
||||||
|
This can be useful to combine a synchronous and an asynchronous code path.
|
||||||
|
@*/
|
||||||
|
Ox.void = function(callback) {
|
||||||
|
Ox.isFunction(callback) && callback();
|
||||||
|
};
|
Loading…
Reference in a new issue