MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / rewrite

Function rewrite

scripts/copy.mjs:25–33  ·  view source on GitHub ↗
(path, replacer)

Source from the content-addressed store, hash-verified

23}
24
25function rewrite(path, replacer) {
26 try {
27 const file = readFileSync(path).toString();
28 const replaced = replacer(file);
29 writeFileSync(path, replaced, { flush: true });
30 } catch {
31 // not found
32 }
33}
34
35let rootVersion;
36

Callers 1

copy.mjsFile · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected