Open maphe opened 1 year ago
Hi! Thanks for the suggestion, as a general rule, I'll consider to add a feature if there are enough users who need it as well.
In the mean time we can also use includes()
:
browser.name.includes("Safari")
Cool thanks, that's what I ended up doing but it is case-sensitive, which is()
is a nice trick for.
Thanks for considering, and thank for the work.
Somewhat related question: Is Safari detected as Mobile Safari
when device.type
is tablet
(i.e. in iPad)?
Is your feature request related to a problem? Please describe. Today
is("Safari")
is does not catch variants likeMobile Safari
. That's one example I came across but now I'm wondering if I'm missing other cases.Describe the solution you'd like It would be nice to have a helper function similar to
is()
but doing string matching instead of equality (eg.match()
). I imagine that'd also help forWindows
andWindows Phone
and some other cases.Describe alternatives you've considered Right now I'm doing
is("Safari") || is("Mobile Safari")
but that feels a little precarious.Thanks