packages/js-toolkit/abstracts/Base/index.js
/**
   * Factory method to generate multiple instance of the class.
   *
   * @param  {String}      nameOrSelector The selector on which to mount each instance.
   * @return {Array<Base>}                A list of the created instance.
   */
Factory method to generate multiple instance of the class.
@param  {String}      nameOrSelector The selector on which to mount each instance.
@return {Array}                A list of the created instance.
Factory method to generate multiple instance of the class . @param { String } nameOrSelector The selector on which to mount each instance . @return { Array } A list of the created instance .
static $factory(nameOrSelector) {
    if (!nameOrSelector) {
      throw new Error(
        'The $factory method requires a component’s name or selector to be specified.'
      );
    }
    return getComponentElements(nameOrSelector).map((el) => new this(el).$mount());
  }
static $factory ( nameOrSelector ) { if ( ! nameOrSelector ) { throw new Error ( 'The $factory method requires a component’s name or selector to be specified.' ) ; } return getComponentElements ( nameOrSelector ) . map ( ( el ) => new this ( el ) . $mount ( ) ) ; }
Factory method to generate multiple instance of the class.
Factory method to generate multiple instance of the class .