MCPcopy Create free account
hub / github.com/denoland/std / paramsEqual

Function paramsEqual

http/unstable_structured_fields_test.ts:846–856  ·  view source on GitHub ↗
(
  a: ReadonlyMap<string, BareItem>,
  b: ReadonlyMap<string, BareItem>,
)

Source from the content-addressed store, hash-verified

844
845// Compare parameters for equality
846function paramsEqual(
847 a: ReadonlyMap<string, BareItem>,
848 b: ReadonlyMap<string, BareItem>,
849): boolean {
850 if (a.size !== b.size) return false;
851 for (const [key, val] of a) {
852 const bVal = b.get(key);
853 if (!bVal || !bareItemsEqual(val, bVal)) return false;
854 }
855 return true;
856}
857
858// Compare items for equality
859function itemsEqual(a: Item, b: Item): boolean {

Callers 2

itemsEqualFunction · 0.85
innerListsEqualFunction · 0.85

Calls 2

bareItemsEqualFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected