yaml-diff-patch
Version:
Apply a JSON diff/patch to YAML while preserving whitespace, comments and overall structure
6 lines (5 loc) • 467 B
TypeScript
import { Operation } from 'fast-json-patch';
export type { AddOperation, BaseOperation, CopyOperation, GetOperation, MoveOperation, RemoveOperation, ReplaceOperation, TestOperation, Operation, } from 'fast-json-patch';
export declare function yamlPatch(yaml: string, rfc6902: Array<Operation>): string;
export declare function yamlDiffPatch(yaml: string, oldJson: any, newJson: any): string;
export declare function yamlOverwrite(yaml: string, newJson: any): string;