diff --git a/source/Ox/js/Function.js b/source/Ox/js/Function.js index 02d79167..789c0946 100644 --- a/source/Ox/js/Function.js +++ b/source/Ox/js/Function.js @@ -52,3 +52,11 @@ Ox.cache = function(fn, options) { } return ret; }; + +/*@ +Ox.void 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(); +}; \ No newline at end of file