IsSupported

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

Usage

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

© 2024 Svecosystem Team