unsubscribe(element) {
    for (const key in this.subscriptions) {
      const subscriptionsGroup = this.subscriptions[key]
      let subscriptionRemoved = false

      for (let i = 0; i < subscriptionsGroup.length; i++) {
        const item = subscriptionsGroup[i]

        // if the element is marked for deletion, delete the subscription as well
        if (item.element === element) {
          delete subscriptionsGroup[i]
          subscriptionRemoved = true
        }
      }

      // If a subscription has been removed from the array,
      // remove the remaining empty element of the array
      if (subscriptionRemoved)
        this.subscriptions[key] = this.subscriptions[key].filter(Boolean)
    }
  }
/**
   * A function that removes binds from html element
   * @param {HTMLElement} element
   */
A function that removes binds from html element
@param {HTMLElement} element
A function that removes binds from html element @param { HTMLElement } element
unsubscribe(element) {
    for (const key in this.subscriptions) {
      const subscriptionsGroup = this.subscriptions[key]
      let subscriptionRemoved = false
      for (let i = 0; i < subscriptionsGroup.length; i++) {
        const item = subscriptionsGroup[i]
        if (item.element === element) {
          delete subscriptionsGroup[i]
          subscriptionRemoved = true
        }
      }
      if (subscriptionRemoved)
        this.subscriptions[key] = this.subscriptions[key].filter(Boolean)
    }
  }
unsubscribe ( element ) { for ( const key in this . subscriptions ) { const subscriptionsGroup = this . subscriptions [ key ] let subscriptionRemoved = false for ( let i = 0 ; i < subscriptionsGroup . length ; i ++ ) { const item = subscriptionsGroup [ i ] if ( item . element === element ) { delete subscriptionsGroup [ i ] subscriptionRemoved = true } } if ( subscriptionRemoved ) this . subscriptions [ key ] = this . subscriptions [ key ] . filter ( Boolean ) } }
A function that removes binds from html element
 @param {HTMLElement} element
A function that removes binds from html element @param { HTMLElement } element
// if the element is marked for deletion, delete the subscription as well // If a subscription has been removed from the array, // remove the remaining empty element of the array