MCPcopy Create free account
hub / github.com/pinterest/gestalt / dedupeArray

Function dedupeArray

docs/docs-components/handleCodeSandbox.ts:53–53  ·  view source on GitHub ↗
(arr: ReadonlyArray<T>)

Source from the content-addressed store, hash-verified

51
52// @ts-expect-error - TS2802 - Type 'Set<T>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
53const dedupeArray = <T>(arr: ReadonlyArray<T>): ReadonlyArray<T> => [...new Set(arr)];
54
55const handleCodeSandbox = async ({ code, title }: { code: string; title: string }) => {
56 const gestaltComponents = Object.keys(gestalt);

Callers 1

handleCodeSandboxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected