MCPcopy Create free account
hub / github.com/Lemoncode/fonk / toSource

Function toSource

src/helpers/get.js:657–667  ·  view source on GitHub ↗

* Converts `func` to its source code. * * @private * @param {Function} func The function to process. * @returns {string} Returns the source code.

(func)

Source from the content-addressed store, hash-verified

655 * @returns {string} Returns the source code.
656 */
657function toSource(func) {
658 if (func != null) {
659 try {
660 return funcToString.call(func);
661 } catch (e) {}
662 try {
663 return func + '';
664 } catch (e) {}
665 }
666 return '';
667}
668
669/**
670 * Creates a function that memoizes the result of `func`. If `resolver` is

Callers 1

baseIsNativeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…