From c8c50b9e89b9fc2e1e89c20680c9ba4120122f8b Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 24 May 2012 16:20:22 +0000 Subject: [PATCH] rename Ox.void to Ox.noop --- source/Ox/js/Function.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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