Skip to content

removeOption()

Popii


Popii / removeOption

removeOption(content, pluginName, optionKey): string

Defined in: migrations.ts:53

Removes a simple (single-line) option from a named plugin call.

Handles scalar values — strings, numbers, booleans, and flat arrays on one line. For multi-line object values, logs a warning and leaves the file unchanged so you can remove the key manually.

string

string

string

string

// Removes `crossfade: true,` from voicePlugin({...})
removeOption(content, "voicePlugin", "crossfade")