@montagejs/can-i-use
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

@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" });

Package Sidebar

Install

npm i @montagejs/can-i-use

Weekly Downloads

1

Version

0.0.7

License

ISC

Unpacked Size

4.54 kB

Total Files

10

Last publish

Collaborators

  • bigdreamer