function replace(options) {
	const functionValues = mapToFunctions(options);
	const keys = Object.keys(functionValues).sort(longest).map(escape);

	const pattern = new RegExp('\\b(' + keys.join('|') + ')\\b', 'g');

	return {
		name: 'replace',

		transform: function transform(code, id) {
			let hasReplacements = false;
			let match;
			let start;
			let end;
			let replacement;

			code = code.replace(pattern, (_, key) => {
				hasReplacements = true;
				return String(functionValues[key](id));
			});

			if (!hasReplacements) {
				return null;
			}

			return {
				code,
				map: null
			};
		}
	};
}
@param {Record<string, unknown>} options
@returns {import('@rollup/browser').Plugin}