From f5d75bc078582e55a0b92b85c4881843d83e0248 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 4 Aug 2020 22:03:30 +0100 Subject: [PATCH] fix comments --- src/utils/maps.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/utils/maps.ts b/src/utils/maps.ts index 0ac931a06e..96832094f0 100644 --- a/src/utils/maps.ts +++ b/src/utils/maps.ts @@ -18,11 +18,10 @@ import { arrayDiff, arrayMerge, arrayUnion } from "./arrays"; /** * Determines the keys added, changed, and removed between two Maps. - * For changes, simple triple equal comparisons are done, not in-depth - * tree checking. - * @param a The first object. Must be defined. - * @param b The second object. Must be defined. - * @returns The difference between the keys of each object. + * For changes, simple triple equal comparisons are done, not in-depth tree checking. + * @param a The first Map. Must be defined. + * @param b The second Map. Must be defined. + * @returns The difference between the keys of each Map. */ export function mapDiff(a: Map, b: Map): { changed: K[], added: K[], removed: K[] } { const aKeys = [...a.keys()]; @@ -35,13 +34,11 @@ export function mapDiff(a: Map, b: Map): { changed: K[], added } /** - * Gets all the key changes (added, removed, or value difference) between - * two Maps. Triple equals is used to compare values, not in-depth tree - * checking. - * @param a The first object. Must be defined. - * @param b The second object. Must be defined. - * @returns The keys which have been added, removed, or changed between the - * two objects. + * Gets all the key changes (added, removed, or value difference) between two Maps. + * Triple equals is used to compare values, not in-depth tree checking. + * @param a The first Map. Must be defined. + * @param b The second Map. Must be defined. + * @returns The keys which have been added, removed, or changed between the two Maps. */ export function mapKeyChanges(a: Map, b: Map): K[] { const diff = mapDiff(a, b);