serverOptionsToDict
satisfactory-dedicated-server-sdk
serverOptionsToDict(
options
):Record
<string
,string
>
Defined in: src/Interfaces/ServerOptions.ts:52
Converts a ServerOptions
object into a dictionary format suitable for
sending to the Satisfactory Dedicated Server API.
Each property is prefixed with FG.
and all values are converted to strings.
Undefined or null values are omitted from the result.
Parameters
options
The ServerOptions
object to convert.
Returns
Record
<string
, string
>
A dictionary (Record<string, string>
) mapping server option keys to string values.
Example
const optionsDict = serverOptionsToDict({
DSAutoPause: true,
AutosaveInterval: 10
});
console.log(optionsDict);
// Output: { "FG.DSAutoPause": "true", "FG.AutosaveInterval": "10" }