MCPcopy Create free account
hub / github.com/babel/babel / maybeWriteFile

Function maybeWriteFile

scripts/generators/tsconfig.ts:8–13  ·  view source on GitHub ↗
(url: URL, contents: string)

Source from the content-addressed store, hash-verified

6}
7
8function maybeWriteFile(url: URL, contents: string) {
9 try {
10 if (fs.readFileSync(url, "utf8") === contents) return;
11 } catch {}
12 fs.writeFileSync(url, contents);
13}
14
15const thirdPartyBabelPlugins = [
16 "@babel/preset-modules/lib/plugins/transform-async-arrows-in-class",

Callers 1

tsconfig.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected