diff --git a/source/Ox/js/Function.js b/source/Ox/js/Function.js index 6986951b..9629fdfe 100644 --- a/source/Ox/js/Function.js +++ b/source/Ox/js/Function.js @@ -57,6 +57,8 @@ Ox.cache = function(fn, options) { /*@ Ox.identity Returns its first argument This can be used as a default iterator + > Ox.identity(Infinity) + Infinity @*/ Ox.identity = function(value) { return value; @@ -66,6 +68,10 @@ Ox.identity = function(value) { Ox.noop Returns undefined and calls optional callback without arguments This can be used as a default iterator in an asynchronous loop, or to combine a synchronous and an asynchronous code path. + > Ox.noop(1, 2, 3) + undefined + > Ox.noop(1, 2, 3, function() { Ox.test(true, true); }) + undefined @*/ Ox.noop = function() { var callback = Ox.last(arguments);