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;
|
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();
|
||||||
};
|
};
|
Loading…
Add table
Reference in a new issue