Skip to content

Commit

Permalink
re-build
Browse files Browse the repository at this point in the history
  • Loading branch information
tanabe committed Jun 8, 2011
1 parent 9740007 commit 51b02c5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
15 changes: 13 additions & 2 deletions build/brook-core.js
Expand Up @@ -261,14 +261,24 @@ Namespace('brook.util')
next(value);
});
};
var emitInterval = function(msec){
var EMIT_INTERVAL_MAP = {};
var emitInterval = function(msec, name){
var msecFunc = ( typeof msec == 'function' )
? msec : function(){return msec};

return ns.promise(function(next,val){
var id = setInterval(function(){
next(val);
},msecFunc());
if (name) {
EMIT_INTERVAL_MAP[name] = id;
}
});
};
var stopEmitInterval = function(name) {
return ns.promise(function(next, value) {
clearInterval(EMIT_INTERVAL_MAP[name]);
next(value);
});
};
/**#@-*/
Expand All @@ -285,7 +295,8 @@ Namespace('brook.util')
unlock : unlock,
from : from,
waitUntil : waitUntil,
emitInterval: emitInterval
emitInterval: emitInterval,
stopEmitInterval: stopEmitInterval
});
});

Expand Down
15 changes: 13 additions & 2 deletions build/brook-mobile.js
Expand Up @@ -261,14 +261,24 @@ Namespace('brook.util')
next(value);
});
};
var emitInterval = function(msec){
var EMIT_INTERVAL_MAP = {};
var emitInterval = function(msec, name){
var msecFunc = ( typeof msec == 'function' )
? msec : function(){return msec};

return ns.promise(function(next,val){
var id = setInterval(function(){
next(val);
},msecFunc());
if (name) {
EMIT_INTERVAL_MAP[name] = id;
}
});
};
var stopEmitInterval = function(name) {
return ns.promise(function(next, value) {
clearInterval(EMIT_INTERVAL_MAP[name]);
next(value);
});
};
/**#@-*/
Expand All @@ -285,7 +295,8 @@ Namespace('brook.util')
unlock : unlock,
from : from,
waitUntil : waitUntil,
emitInterval: emitInterval
emitInterval: emitInterval,
stopEmitInterval: stopEmitInterval
});
});

Expand Down
15 changes: 13 additions & 2 deletions build/brook.js
Expand Up @@ -261,14 +261,24 @@ Namespace('brook.util')
next(value);
});
};
var emitInterval = function(msec){
var EMIT_INTERVAL_MAP = {};
var emitInterval = function(msec, name){
var msecFunc = ( typeof msec == 'function' )
? msec : function(){return msec};

return ns.promise(function(next,val){
var id = setInterval(function(){
next(val);
},msecFunc());
if (name) {
EMIT_INTERVAL_MAP[name] = id;
}
});
};
var stopEmitInterval = function(name) {
return ns.promise(function(next, value) {
clearInterval(EMIT_INTERVAL_MAP[name]);
next(value);
});
};
/**#@-*/
Expand All @@ -285,7 +295,8 @@ Namespace('brook.util')
unlock : unlock,
from : from,
waitUntil : waitUntil,
emitInterval: emitInterval
emitInterval: emitInterval,
stopEmitInterval: stopEmitInterval
});
});

Expand Down
2 changes: 1 addition & 1 deletion build/brook.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51b02c5

Please sign in to comment.