packages/js-toolkit/index.js
/**
 * Create a Base instance with the given object configuration.
 * @param {HTMLElement|String} elementOrSelector The instance root HTML element.
 * @param {Object}             options           The Base class configuration.
 */
Create a Base instance with the given object configuration.
@param {HTMLElement|String} elementOrSelector The instance root HTML element.
@param {Object}             options           The Base class configuration.
Create a Base instance with the given object configuration . @param { HTMLElement|String } elementOrSelector The instance root HTML element . @param { Object } options The Base class configuration .
function createBase(elementOrSelector, options) {
  const Component = defineComponent(options);
  const element =
    typeof elementOrSelector === 'string'
      ? document.querySelector(elementOrSelector)
      : elementOrSelector;
  return new Component(element);
}
function createBase ( elementOrSelector , options ) { const Component = defineComponent ( options ) ; const element = typeof elementOrSelector === 'string' ? document . querySelector ( elementOrSelector ) : elementOrSelector ; return new Component ( element ) ; }
Create a Base instance with the given object configuration.
Create a Base instance with the given object configuration .
/** @type {HTMLElement} */