rename Ox.void to Ox.noop

This commit is contained in:
rlx 2012-05-24 16:20:22 +00:00
parent d5962a972d
commit c8c50b9e89

View file

@ -53,14 +53,19 @@ Ox.cache = function(fn, options) {
return ret; return ret;
}; };
/*@
Ox.identity <f> Returns its first argument
This can be used as a default iterator
@*/
Ox.identity = function(val) { Ox.identity = function(val) {
return val; return val;
}; };
/*@ /*@
Ox.void <f> Returns nothing and calls options callback without arguments Ox.noop <f> Returns undefined and calls optional callback without arguments
This can be useful to combine a synchronous and an asynchronous code path. 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(); Ox.isFunction(callback) && callback();
}; };