Function isPWARoute

  • Checks if the given route is a PWA (Progressive Web App) route.

    This function determines if the provided route string contains the 'pwa:' prefix, indicating that it is a route related to a Progressive Web App.

    Parameters

    • route: string

      The route string to check.

    Returns boolean

    true if the route contains 'pwa:', otherwise false.

    const route1 = 'pwa:/home';
    const route2 = '/about';

    console.log(isPWARoute(route1)); // true
    console.log(isPWARoute(route2)); // false