(filePath: string, extension = ".lua")
| 411 | } |
| 412 | |
| 413 | function requirePathForFile(filePath: string, extension = ".lua"): string { |
| 414 | if (!extension.startsWith(".")) { |
| 415 | extension = `.${extension}`; |
| 416 | } |
| 417 | if (filePath.endsWith(extension)) { |
| 418 | return formatPathToLuaPath(filePath.substring(0, filePath.length - extension.length)); |
| 419 | } else { |
| 420 | return formatPathToLuaPath(filePath); |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | function replaceInSourceMap(node: SourceNode, parent: SourceNode, require: string, resolvedRequire: string): boolean { |
| 425 | if ((!node.children || node.children.length === 0) && node.toString() === require) { |
no test coverage detected