* Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code.
(func)
| 28714 | * @returns {string} Returns the source code. |
| 28715 | */ |
| 28716 | function toSource(func) { |
| 28717 | if (func != null) { |
| 28718 | try { |
| 28719 | return funcToString.call(func); |
| 28720 | } catch (e) {} |
| 28721 | try { |
| 28722 | return func + ''; |
| 28723 | } catch (e) {} |
| 28724 | } |
| 28725 | return ''; |
| 28726 | } |
| 28727 | |
| 28728 | module.exports = toSource; |
| 28729 |
no outgoing calls
no test coverage detected