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
A Cerebral module for everything user agent.
The useragent module puts information about the browser into your model, and it also updates this information when the size of the browser changes etc.
This is still alpha but to test the bleeding edge
npm install cerebral-module-useragent@next --save
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
})
}
})
The useragent module will populate your model on the given namespace. All you need to do in your view layer is to grab whatever data you need from it, for example media:
export default connect({
media: 'useragent.media.*'
}, ...)
FAQs
Adds useragent specs to your cerebral state model
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.