applyDiff
이 콘텐츠는 아직 번역되지 않았습니다.
function applyDiff( input, diff, mode): string;Applies a headerless V4A diff to the provided file content.
- mode “default”: patch an existing file using V4A sections (”@@” + +/-/space lines).
- mode “create”: create-file syntax that requires every line to start with ”+”.
The function preserves trailing newlines from the original file and throws when the diff cannot be applied cleanly.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”string