Skip to main content

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>
	

Type Definition

		class IsSupported {
	readonly current: boolean;
}