MCPcopy
hub / github.com/vueuse/vueuse / useSupported

Function useSupported

packages/core/useSupported/index.ts:8–17  ·  view source on GitHub ↗
(callback: () => unknown)

Source from the content-addressed store, hash-verified

6
7/* @__NO_SIDE_EFFECTS__ */
8export function useSupported(callback: () => unknown): UseSupportedReturn {
9 const isMounted = useMounted()
10
11 return computed(() => {
12 // to trigger the ref
13 // eslint-disable-next-line ts/no-unused-expressions
14 isMounted.value
15 return Boolean(callback())
16 })
17}

Callers 15

useBatteryFunction · 0.90
useBroadcastChannelFunction · 0.90
useShareFunction · 0.90
useEyeDropperFunction · 0.90
useDeviceOrientationFunction · 0.90
useBluetoothFunction · 0.90
useNetworkFunction · 0.90
useFileSystemAccessFunction · 0.90
useIntersectionObserverFunction · 0.90
usePermissionFunction · 0.90
useResizeObserverFunction · 0.90
useSpeechSynthesisFunction · 0.90

Calls 1

useMountedFunction · 0.90

Tested by

no test coverage detected