MCPcopy Create free account
hub / github.com/developit/microbundle / jsOrTs

Function jsOrTs

src/index.js:194–202  ·  view source on GitHub ↗
(cwd, filename)

Source from the content-addressed store, hash-verified

192}
193
194async function jsOrTs(cwd, filename) {
195 const extension = (await isFile(resolve(cwd, filename + '.ts')))
196 ? '.ts'
197 : (await isFile(resolve(cwd, filename + '.tsx')))
198 ? '.tsx'
199 : '.js';
200
201 return resolve(cwd, `${filename}${extension}`);
202}
203
204async function getInput({ entries, cwd, source, module }) {
205 const input = [];

Callers 1

getInputFunction · 0.85

Calls 1

isFileFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…