npm.io
0.0.5 • Published 3 years ago

web-api-checker

Licence
MIT
Version
0.0.5
Deps
0
Size
16 kB
Vulns
0
Weekly
0

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

Keywords