asPreprocessorValueTransformer = function ( target, targetProperty, value) {

	// abort if nothing to update, same value
	if( target.defines[targetProperty] && target.defines[targetProperty] === value ) return;

	// or change the preprocessor and update
	target.defines[targetProperty] = value;
	target.needsUpdate = true;

}
Transform a value as a preprocessor value
@type {import('../Mediator').MediationTransformer}