add Ox.Log, determine Ox.PATH by looking at the _last_ Ox.js script
This commit is contained in:
parent
1954a7a799
commit
116d0bfdbf
4 changed files with 23 additions and 5 deletions
|
|
@ -121,6 +121,23 @@ Ox.load = function() {
|
|||
});
|
||||
};
|
||||
|
||||
Ox.Log = (function() {
|
||||
var filter = /.*?/,
|
||||
that = function() {
|
||||
Ox.Log.log.apply(null, arguments);
|
||||
return that;
|
||||
};
|
||||
that.filter = function(regexp) {
|
||||
filter = regexp;
|
||||
};
|
||||
that.log = function() {
|
||||
if (filter.test(JSON.stringify(arguments))) {
|
||||
Ox.print.apply(null, arguments);
|
||||
}
|
||||
};
|
||||
return that;
|
||||
}());
|
||||
|
||||
/*@
|
||||
Ox.print <f> Prints its arguments to the console
|
||||
(arg, ...) -> <s> String
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue