MCPcopy
hub / github.com/vitejs/vite / filterDuplicateOptions

Function filterDuplicateOptions

packages/vite/src/node/cli.ts:94–100  ·  view source on GitHub ↗
(options: T)

Source from the content-addressed store, hash-verified

92}
93
94const filterDuplicateOptions = <T extends object>(options: T) => {
95 for (const [key, value] of Object.entries(options)) {
96 if (Array.isArray(value)) {
97 options[key as keyof T] = value[value.length - 1]
98 }
99 }
100}
101/**
102 * removing global flags before passing as command specific sub-configs
103 */

Callers 1

cli.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected