Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
cerebral-module-useragent
Advanced tools
Adds useragent specs to your cerebral state model
NPM
npm install cerebral-module-useragent@next --save --save-exact
YARN
yarn add cerebral-module-useragent@next --exact
The useragent module puts information about the browser into your state tree, and it also updates this information when this information changes.
import {Controller} from 'cerebral'
import Useragent from 'cerebral-module-useragent'
const controller = Controller({
modules: {
useragent: Useragent({
// Use CSS media queries to determine
// custom sizes available in your model.
// They will be toggle between true/false in your
// model
media: {
small: '(min-width: 600px)',
medium: '(min-width: 1024px)',
large: '(min-width: 1440px)',
portrait: '(orientation: portrait)'
},
// store all feature tests in model
feature: true,
parse: {
// parse useragent.browser from ua string
browser: true,
// parse useragent.device from ua string
device: true
},
// check the docs at: https://github.com/HubSpot/offline#advanced
offline: {
checkOnLoad: false,
interceptRequests: true,
reconnect: {
initialDelay: 3,
delay: 1.5
},
requests: false
},
// update window size on resize
window: true
})
}
})
FAQs
Adds useragent specs to your cerebral state model
The npm package cerebral-module-useragent receives a total of 0 weekly downloads. As such, cerebral-module-useragent popularity was classified as not popular.
We found that cerebral-module-useragent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.