Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@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 80 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.