function replaceInFile({ file, content, search, replace }) {
	const text = content.replace(search, replace);

	self.postMessage({
		action: "replace-result",
		data: { file, text },
	});
}
Replace a string in the content of a file.
@param {object} arg - The content of the file to search.
@param {import('lib/fileList').Tree} arg.file - The content of the file to search.
@param {string} content - The content of the file to search.
@param {RegExp} arg.search - The string to search for.
@param {string} arg.replace - The string to replace with.