ChemPal Documentation - v1.18.0
    Preparing search index...

    Function getUnseenDrops

    • Picks the alerts with a drop the user hasn't seen.

      Parameters

      Returns PriceAlert[]

      Those with an unseen drop

      getUnseenDrops(await loadPriceAlerts()).length; // 2
      
      export function getUnseenDrops(alerts: readonly PriceAlert[]): PriceAlert[] {
      return alerts.filter(({ hasUnseenDrop }) => hasUnseenDrop);
      }