MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / keys

Function keys

shared/common-utils.ts:32–34  ·  view source on GitHub ↗
(o: Partial<Record<K, any>>)

Source from the content-addressed store, hash-verified

30// This util is for cases where the key is a union of a few possible keys and we
31// want the resulting array properly typed.
32export function keys<K extends string | number | symbol>(o: Partial<Record<K, any>>): K[] {
33 return Object.keys(o) as K[];
34}
35
36export function unique<V>(arr: V[]): V[] {
37 return [...new Set(arr)];

Callers 1

addSelectorsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected