diff --git a/source/Ox/js/Function.js b/source/Ox/js/Function.js index 037213a1..aa38c89f 100644 --- a/source/Ox/js/Function.js +++ b/source/Ox/js/Function.js @@ -53,14 +53,19 @@ Ox.cache = function(fn, options) { return ret; }; +/*@ +Ox.identity Returns its first argument + This can be used as a default iterator +@*/ Ox.identity = function(val) { return val; }; /*@ -Ox.void Returns nothing and calls options callback without arguments - This can be useful to combine a synchronous and an asynchronous code path. +Ox.noop Returns undefined and calls optional callback without arguments + This can be used to combine a synchronous and an asynchronous code path. @*/ -Ox.void = function(callback) { +// IE 8 doesn't like `Ox.void` +Ox.noop = function(callback) { Ox.isFunction(callback) && callback(); }; \ No newline at end of file