Skip to content

Commit

Permalink
added log and debug wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislas Polu committed Apr 21, 2012
1 parent 35c5eb9 commit 79f0d7b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
20 changes: 0 additions & 20 deletions cell-0.2.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion make.sh
Expand Up @@ -7,6 +7,6 @@ cat src/event.js >> all.js
cat src/container.js >> all.js
cat src/cell.js >> all.js

jsmin < all.js > cell-0.2.min.js
jsmin < all.js > cell-0.3.min.js

rm all.js
19 changes: 19 additions & 0 deletions src/base.js
Expand Up @@ -142,3 +142,22 @@ CELL.setter = function(that, name, obj, prop) {
CELL.responds = function(that, name) {
return (that[name] && typeof that[name] === 'function');
};

/**
* log(data)
* Wrapper around console.log for compatiblity
*/
CELL.log = function() {
if(console &&
typeof console.log === 'function')
return console.log.apply(console, arguments);
};


CELL.DEBUG = false;

CELL.debug = function() {
if(CELL.DEBUG && console &&
typeof console.log === 'function')
return console.log.apply(console, arguments);
};

0 comments on commit 79f0d7b

Please sign in to comment.