feature(util) bind -> exec.with

This commit is contained in:
coderaiser 2014-05-23 07:55:24 -04:00
parent ec9a78a27a
commit 6b58016616
16 changed files with 61 additions and 60 deletions

View file

@ -11,16 +11,17 @@
function join(before, req, res, callback) {
var names,
readFunc = Util.bind(readPipe, req, res),
exec = Util.exec,
readFunc = exec.with(readPipe, req, res),
path = main.getPathName(req),
isJoin = CloudFunc.isJoinURL(path);
if (!isJoin)
Util.exec(callback);
else {
if (!isJoin) {
exec(callback);
} else {
names = CloudFunc.getJoinArray(path);
Util.exec.if(!before, readFunc, function(callback) {
exec.if(!before, readFunc, function(callback) {
before(names, callback);
});
}