Skip to content

Lmmmmmm-bb/web-api-checker

Repository files navigation

Web API Checker

codeql release license npm

Just check the web api is available or not before using it, inspired by toniengelhardt.

npm install web-api-checker

Usage

import { isWebAPISupport } from 'web-api-checker';

// check all api support in https://api-checker.lmmmmmm.dev
console.log(isWebAPISupport('WebGPU')); // false
console.log(isWebAPISupport('WebSocket')); // true
// check multiple web api
console.log(isWebAPISupport(['WebGPU', 'WebSocket'])); // false