source: trip-planner-front/node_modules/lodash/_toSource.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 556 bytes
RevLine 
[6a3a178]1/** Used for built-in method references. */
2var funcProto = Function.prototype;
3
4/** Used to resolve the decompiled source of functions. */
5var funcToString = funcProto.toString;
6
7/**
8 * Converts `func` to its source code.
9 *
10 * @private
11 * @param {Function} func The function to convert.
12 * @returns {string} Returns the source code.
13 */
14function toSource(func) {
15 if (func != null) {
16 try {
17 return funcToString.call(func);
18 } catch (e) {}
19 try {
20 return (func + '');
21 } catch (e) {}
22 }
23 return '';
24}
25
26module.exports = toSource;
Note: See TracBrowser for help on using the repository browser.