MCPcopy Index your code
hub / github.com/tinyplex/tinybase / copyWithReplace

Function copyWithReplace

gulpfile.mjs:167–175  ·  view source on GitHub ↗
(src, replacements, dst = src)

Source from the content-addressed store, hash-verified

165 });
166
167const copyWithReplace = async (src, replacements, dst = src) =>
168 await promises.writeFile(
169 dst,
170 replacements.reduce(
171 (file, [from, to]) => file.replaceAll(from, to),
172 await promises.readFile(src, UTF8),
173 ),
174 UTF8,
175 );
176
177const gzipFile = async (fileName) =>
178 await promises.writeFile(

Callers 1

compileModuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…