439
}
440
441
>
function insertAtLocation(content: string, key: string, value: any, location: InsertLocation, tree: INode[], formattingOptions: FormattingOptions): string {
settingsMerge.ts
442
>
let edits: Edit[];
443
>
/* Insert at the end */
444
>
if (location.index === -1) {
445
edits = setProperty(content, [key], value, formattingOptions);
447
edits = getEditToInsertAtLocation(content, key, value, location, tree, formattingOptions).map(edit => withFormatting(content, edit, formattingOptions)[0]);
448
}
450
>
}
451
452
function getEditToInsertAtLocation(content: string, key: string, value: any, location: InsertLocation, tree: INode[], formattingOptions: FormattingOptions): Edit[] {