use Ox.filter
This commit is contained in:
parent
ec12eddfba
commit
e1192fd45e
1 changed files with 9 additions and 9 deletions
|
@ -344,15 +344,15 @@ Ox.wrap = function(value, chained) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Ox.methods(Ox).forEach(function(method) {
|
Ox.methods(Ox).filter(function(method) {
|
||||||
if (method[0] == method[0].toLowerCase()) {
|
return method[0] == method[0].toLowerCase();
|
||||||
|
}).forEach(function(method) {
|
||||||
wrapper[method] = function() {
|
wrapper[method] = function() {
|
||||||
var args = Array.prototype.slice.call(arguments), ret;
|
var args = Array.prototype.slice.call(arguments), ret;
|
||||||
args.unshift(value);
|
args.unshift(value);
|
||||||
ret = Ox[method].apply(Ox, args);
|
ret = Ox[method].apply(Ox, args);
|
||||||
return wrapper.chained ? Ox.wrap(ret, true) : ret;
|
return wrapper.chained ? Ox.wrap(ret, true) : ret;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return wrapper;
|
return wrapper;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue