MCPcopy Create free account
hub / github.com/unconed/TermKit / bug

Function bug

HTML/termkit.js:44–55  ·  view source on GitHub ↗
(object, type)

Source from the content-addressed store, hash-verified

42}
43
44function bug(object, type) {
45 $.each(object, function (index) {
46 if ($.isFunction(this)) {
47 var original = this;
48 object[index] = function () {
49 console.log(type +'.'+ index);
50 console.log(arguments);
51 original.apply(this, arguments);
52 };
53 }
54 });
55}
56
57function oneOrMany(object) {
58 return (typeof object == 'object' && object.constructor == [].constructor) ? object : [ object ];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected