MCPcopy Index your code
hub / github.com/nodejs/node / toRealPath

Function toRealPath

lib/internal/modules/helpers.js:64–68  ·  view source on GitHub ↗

* Resolves the path of a given `require` specifier, following symlinks. * @param {string} requestPath The `require` specifier * @returns {string}

(requestPath)

Source from the content-addressed store, hash-verified

62 * @returns {string}
63 */
64function toRealPath(requestPath) {
65 return fs.realpathSync(requestPath, {
66 [internalFS.realpathCacheKey]: realpathCache,
67 });
68}
69
70/** @type {Set<string>} */
71let cjsConditions;

Callers 3

resolveMainPathFunction · 0.85
tryFileFunction · 0.85
loader.jsFile · 0.85

Calls 1

realpathSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…