Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@digitalrelab/react-browser-support
Advanced tools
A simple React hook to render contents based on browser support. TypeScript ready.
A simple React hook to render contents based on browser support. TypeScript ready.
yarn add @digitalrelab/react-browser-support
or
npm install @digitalrelab/react-browser-support
import { useBrowserSupport } from "@digitalrelab/react-browser-support"
export const App: React.FC = () => {
const isBrowserSupported = useBrowserSupport({ 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.
The keys of browsersRules are equivalent to a 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.
useBrowserSupport({ 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 React hook to render contents based on browser support. TypeScript ready.
The npm package @digitalrelab/react-browser-support receives a total of 0 weekly downloads. As such, @digitalrelab/react-browser-support popularity was classified as not popular.
We found that @digitalrelab/react-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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.