ChemPal Documentation - v1.6.0
    Preparing search index...
    • Whether a supplier's shipping scope fulfills a requested one, treating scope as a hierarchy: a scope covers itself and every narrower scope (worldwide covers all, local covers only local).

      Parameters

      Returns boolean

      True when supplierScope is equal to or broader than requested.

      shippingCovers('worldwide', 'domestic'); // => true
      shippingCovers('domestic', 'worldwide'); // => false
      shippingCovers('domestic', 'local'); // => true
      export function shippingCovers(supplierScope: ShippingRange, requested: ShippingRange): boolean {
      return SHIPPING_SCOPE_RANK[supplierScope] >= SHIPPING_SCOPE_RANK[requested];
      }