1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
4 import { union, keys as keys_1, filter } from "lodash";
6 export function getModifiedKeys(a: any, b: any) {
7 const keys = union(keys_1(a), keys_1(b));
8 return filter(keys, key => a[key] !== b[key]);
11 export function getModifiedKeysValues(a: any, b: any) {
12 const keys = getModifiedKeys(a, b);
20 export function sortByKey<T>(arr: T[], key: string): T[] {
21 return arr.sort((a, b) => {
22 if (a[key] < b[key]) {
25 if (a[key] > b[key]) {