Display the name of the constructor when pretty printing objects

Fixes #598 [finishes #81228592]
This commit is contained in:
slackersoft
2014-12-16 12:56:04 -08:00
parent eca8d8f009
commit 7570bc422b
6 changed files with 39 additions and 35 deletions

View File

@@ -37,6 +37,10 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
return obj.nodeType > 0;
};
j$.fnNameFor = function(func) {
return func.name || func.toString().match(/^\s*function\s*(\w*)\s*\(/)[1];
};
j$.any = function(clazz) {
return new j$.Any(clazz);
};