MCPcopy Index your code
hub / github.com/simstudioai/sim / mergeOption

Function mergeOption

apps/sim/hooks/selectors/registry.ts:97–103  ·  view source on GitHub ↗
(options: SelectorOption[], option?: SelectorOption | null)

Source from the content-addressed store, hash-verified

95}
96
97export function mergeOption(options: SelectorOption[], option?: SelectorOption | null) {
98 if (!option) return options
99 if (options.some((item) => item.id === option.id)) {
100 return options
101 }
102 return [option, ...options]
103}

Callers 1

useSelectorOptionMapFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected