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

Function convertToOptionValueWithAbsolutePaths

test/fixtures/snapshot/typescript.js:41403–41416  ·  view source on GitHub ↗
(option, value, toAbsolutePath)

Source from the content-addressed store, hash-verified

41401 }
41402 ts.convertToOptionsWithAbsolutePaths = convertToOptionsWithAbsolutePaths;
41403 function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) {
41404 if (option && !isNullOrUndefined(value)) {
41405 if (option.type === "list") {
41406 var values = value;
41407 if (option.element.isFilePath && values.length) {
41408 return values.map(toAbsolutePath);
41409 }
41410 }
41411 else if (option.isFilePath) {
41412 return toAbsolutePath(value);
41413 }
41414 }
41415 return value;
41416 }
41417 /**
41418 * Parse the contents of a config file (tsconfig.json).
41419 * @param json The contents of the config file to parse

Callers 1

Calls 3

isNullOrUndefinedFunction · 0.85
toAbsolutePathFunction · 0.85
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…