MCPcopy Index your code
hub / github.com/ampproject/amphtml / findJsSourceFilename

Function findJsSourceFilename

build-system/common/fs.js:8–14  ·  view source on GitHub ↗

* @param {string} nameWithoutExtension * @param {?string|void} cwd * @return {Promise }

(nameWithoutExtension, cwd)

Source from the content-addressed store, hash-verified

6 * @return {Promise<string|undefined>}
7 */
8async function findJsSourceFilename(nameWithoutExtension, cwd) {
9 const [filename] = await glob(
10 `${nameWithoutExtension}.{js,ts,tsx}`,
11 cwd ? {cwd} : undefined
12 );
13 return filename;
14}
15
16module.exports = {
17 findJsSourceFilename,

Callers 1

buildExtensionJsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected