MCPcopy Create free account
hub / github.com/breck7/scroll / resolvePath

Method resolvePath

external/.scrollLibs.js:14377–14383  ·  view source on GitHub ↗
(filePath, programFilepath)

Source from the content-addressed store, hash-verified

14375 }
14376 }
14377 static resolvePath(filePath, programFilepath) {
14378 // For use in Node.js only
14379 if (!filePath.startsWith(".")) return filePath
14380 const path = require("path")
14381 const folder = this.getPathWithoutFileName(programFilepath)
14382 return path.resolve(folder + "/" + filePath)
14383 }
14384 static resolveProperty(obj, path, separator = ".") {
14385 const properties = Array.isArray(path) ? path : path.split(separator)
14386 return properties.reduce((prev, curr) => prev && prev[curr], obj)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected