Skip to content

replaceOptionValue()

Popii


Popii / replaceOptionValue

replaceOptionValue(content, pluginName, optionKey, oldValue, newValue): string

Defined in: migrations.ts:142

Replaces a scalar option value within a named plugin call.

string

string

string

string

string

string

// Changes `provider: "openai"` to `provider: "anthropic"` in popiiAiPlugin({...})
replaceOptionValue(content, "popiiAiPlugin", "provider", '"openai"', '"anthropic"')