0.0.7 • Published 2 years ago

@montagejs/can-i-use v0.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@montagejs/can-i-use

As the package name suggests, this package is mainly to detect if I can use something, in a different browser environment.

Usage

$ npm i @montagejs/can-i-use --save
import { canIUseHtmlTagProperty, canIUseCss } from "@montagejs/can-i-use";

const hadLoadingInImg = canIUseHtmlTagProperty({ tag: "img", prop: "loading" });

// short write
const hadDispalyInDiv = canIUseCss("display: none");

// or 
// const hadDispalyInDiv = canIUseCss({ property: "display", value: "none" });