Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@digitalrelab/browser-support
Advanced tools
A simple function that determines whether the user's browser is supported or not. TypeScript ready.
A simple function that determines whether the user's browser is supported or not. TypeScript ready.
yarn add @digitalrelab/browser-support
or
npm install @digitalrelab/browser-support
The following is a usage demo using a React component. Nevertheless, browser-support
works with all JavaScript frameworks.
import React from "react"
import { browserSupport } from "@digitalrelab/browser-support"
export const App: React.FC = () => {
const isBrowserSupported = browserSupport({ ie: false })
// Will render for IE only.
if (!isBrowserSupported) {
return <div>Friends don't let friends use IE.</div>
}
return <div>Oh yeah, your browser is great!</div>
}
This method returns true
when current browser is actually supported. false
otherwise.
browsersRules
?The keys of browsersRules
are equivalent to browsers' names. Their values can be whether it's disabled or not (false
or true
), or the minimum version to run on that browser. i.e.
browserSupport({ ie: false, chrome: 48 })
The above means that all IE versions are disabled, and Chrome requires version higher than 48.
chrome
ie
firefox
safari
opera
edge
Brought to you by DigitalReLab, LLC. MIT.
FAQs
A simple function that determines whether the user's browser is supported or not. TypeScript ready.
The npm package @digitalrelab/browser-support receives a total of 4 weekly downloads. As such, @digitalrelab/browser-support popularity was classified as not popular.
We found that @digitalrelab/browser-support demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.