You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
290 B
14 lines
290 B
var isNil = require('./isNil');
|
|
exports = function(fn) {
|
|
if (isNil(fn)) return '';
|
|
try {
|
|
return fnToStr.call(fn);
|
|
} catch (e) {}
|
|
try {
|
|
return fn + '';
|
|
} catch (e) {}
|
|
return '';
|
|
};
|
|
var fnToStr = Function.prototype.toString;
|
|
|
|
module.exports = exports;
|
|
|