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.
Dependency free focus manager with built-in universal key navigation.
npm i --save aim
Register your focusable targets with Aim and Aim will map these into a virtual table-esque view.
Aim will now listen for key events, delegate these to the currently focused target and execute default cursor navigation if not prevented by target handlers.
aim.register({
onFocus (target) {
// fires when target is focused
// return false to prevent focus
},
onBlur (target) {
// fires when target is unfocused
},
onRight (target) {
// fires when right is pressed
// return false to prevent default behaviour (ie. moving cursor to the right)
},
onEnter (target) {
// fires when enter is pressed
}
}, [0, 0, 1])
Registers target on given position.
Param | Type | Description |
---|---|---|
target | Object | Target containing handlers. |
position | Array | Coordinates for position. |
Unregisters target.
Param | Type | Description |
---|---|---|
target | Object | Target to unregister. |
Update properties for given target. Can be used for repositioning / resizing targets.
Param | Type | Description |
---|---|---|
target | Object | Target to update. |
property | String | Property to update, eg. x or y . |
value | Number | New value of property |
Sets an offsetY value to (holder) target, without updating all individual child nodes. Will be used when calculating left/up/down/right node.
Param | Type | Description |
---|---|---|
target | Object | Target to update. |
value | Number | New value of property |
Same as aim.offsetY() for the x axis.
Get target by position.
Param | Type | Description |
---|---|---|
position | Array | The coordinates to target (eg. [0, 0, 1]). |
Move focus to the left.
Move focus to up.
Move focus to the right.
Move focus to down.
Delegate key event to Aim.
Param | Type | Description |
---|---|---|
event | Object | DOM KeyEvent. |
Fires when target is focused.
Param | Type | Description |
---|---|---|
target | Object | Registered target. |
Fires on target when removing focus.
Param | Type | Description |
---|---|---|
target | Object | Registered target. |
Fires on focused target when user presses "enter".
Param | Type | Description |
---|---|---|
target | Object | Registered target. |
FAQs
Dependency free focus manager with built-in universal key navigation.
The npm package aim receives a total of 0 weekly downloads. As such, aim popularity was classified as not popular.
We found that aim 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
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.