@haiix/tcomponent
    Preparing search index...

    Function kebabKeys

    • Converts the keys of an object to kebab-case and returns a new object. This is particularly useful for registering sub-components in TComponent.uses using object shorthand notation, automatically generating standard HTML tag names.

      Type Parameters

      • T

      Parameters

      • obj: Record<string, T>

        The object whose keys should be converted.

      Returns Record<string, T>

      A new object with kebab-cased keys.

      class App extends TComponent {
      static uses = kebabKeys({ DynamicList, UserProfile });
      // Results in: { 'dynamic-list': DynamicList, 'user-profile': UserProfile }
      }