Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@dflex/draggable
Advanced tools
npm install @dflex/draggable
DFlex Draggable depends on three principles to achieve DOM interactivity:
import { store, Draggable } from "@dflex/draggable";
Each element should be registered in draggable store in order to be dragged later.
store.register(id: string);
The dragging instance should be created when onmousedown
is fired. So you
initialized the element before start dragging.
const dflexDraggable = new Draggable(id, clickCoordinates);
id: string
registered element-id in the store.coordinate: AxesPoint
is an object with {x: number, y: number}
contains the coordinates of thedflexDraggable.dragAt(x, y);
x: number
is event.clientX, the horizontal click coordinate.y: number
is event.clientY, the vertical click coordinate.dflexDraggable.endDragging();
It's necessary to cleanup the element from store when the element won't be used or will be removed/unmounted from the DOM to prevent memory leaks.
store.unregister(id);
id: string
registered element-id.For documentation, more information about DFlex and a live demo, be sure to visit the DFlex website https://www.dflex.dev/
DFlex is MIT License.
FAQs
Draggable only package for all JavaScript frameworks
The npm package @dflex/draggable receives a total of 5 weekly downloads. As such, @dflex/draggable popularity was classified as not popular.
We found that @dflex/draggable 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.