
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
react-mouse-aware
Advanced tools
A tiny higher order component to track mouse state.
import { Component } from 'react';
import { mouseAware } from 'react-mouse-aware';
@mouseAware({ // same as default options
inDelay: 0,
outDelay: 0,
inHandler: 'onMouseEnter',
outHandler: 'onMouseLeave',
key: 'isOver'
})
@mouseAware({
inDelay: 300,
outDelay: 100,
inHandler: 'onMouseDown',
outHandler: 'onMouseUp',
key: 'isPressed'
})
class CustomComponent extends Component {
render() {
// props will include the in and out handlers
let { isOver, isPressed, className, ...props } = this.props;
if (isOver) className += ' hovered'; // mouse is over component
if (isPressed) className += ' active'; // mouse has been held down for 300ms or was just released
return (
<div {...props} className={className}>
</div>
)
}
};
@mouseAware(options)
export default class Test extends React.Component {
/* your code */
}
class Test extends React.Component {
/* your code */
}
export default mouseAware(options)(Test);
inDelay
defaults to 0
Time in ms
to wait before setting the active
status to true
.
outDelay
defaults to 0
Time in ms
to wait before setting the active
status to false
.
inHandler
defaults to 'onMouseEnter'
Property name to expose the inHandler
as.
outHandler
defaults to 'onMouseLeave'
Property name to expose the outHandler
as.
openFunction
no defaultProperty name to expose the force open function as. This function will ignore the in delay
closeFunction
no defaultProperty name to expose the force close function as. This function will ignore the out delay.
key
defaults to 'isOver'
Property name to expose the active
status as.
FAQs
A tiny higher order component to track mouse state.
We found that react-mouse-aware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.