From 9d26a4b6c3cd0bedb782a1913a93566cc5c862fc Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 27 May 2012 23:14:59 +0200 Subject: [PATCH] add tests --- source/Ox/js/Function.js | 6 ++++++ 1 file changed, 6 insertions(+) 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);