rename Ox.void to Ox.noop
This commit is contained in:
parent
d5962a972d
commit
c8c50b9e89
1 changed files with 8 additions and 3 deletions
|
@ -53,14 +53,19 @@ Ox.cache = function(fn, options) {
|
|||
return ret;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.identity <f> Returns its first argument
|
||||
This can be used as a default iterator
|
||||
@*/
|
||||
Ox.identity = function(val) {
|
||||
return val;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.void <f> Returns nothing and calls options callback without arguments
|
||||
This can be useful to combine a synchronous and an asynchronous code path.
|
||||
Ox.noop <f> 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();
|
||||
};
|
Loading…
Reference in a new issue