@montagejs/can-i-use
v0.0.7
Published
can i use What are the characteristics in js or css or html?
Downloads
3
Maintainers
Readme
@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" });