@semo/core
    Preparing search index...

    Function formatRcOptions

    • Format options keys to make them compatible with both param cases and camel cases

      Type Parameters

      • T extends Record<string, unknown>

      Parameters

      • opts: T

        The options object to format

      Returns Record<string, unknown>

      A new object with formatted keys

      When input is not a valid object

      formatRcOptions({ 'foo-bar': 1 }) // returns { fooBar: 1 }
      formatRcOptions({ 'foo.bar': 1 }) // returns { foo_bar: 1 }