useSupported

Determine if a feature is supported by the environment before using it.

Usage

	<script lang="ts">
  import { useSupported } from "runed";
 
  const isSupported = useSupported(() => navigator && "geolocation" in navigator);
 
  if (isSupported.value) {
    // Do something with the geolocation API
  }
</script>	
MIT

© 2024 Svecosystem Team