Bump to v4.9.0.

This commit is contained in:
John-David Dalton
2016-04-07 21:35:23 -07:00
parent 8349627be6
commit 57f1942947
48 changed files with 257 additions and 155 deletions

View File

@@ -1,4 +1,4 @@
define(['./isFunction', './toString'], function(isFunction, toString) {
define([], function() {
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
@@ -11,12 +11,15 @@ define(['./isFunction', './toString'], function(isFunction, toString) {
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (isFunction(func)) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return toString(func);
return '';
}
return toSource;