Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
event-replay-helpers
Advanced tools
Helpers for serialising and rehydrating JavaScript mouse and touch events
Readme
Ever needed to save JavaScript (mouse/touch) events to the server to be replayed later? I did once, so now you have this shitty library.
yarn add event-replay-helpers
Currently only works for mousemove
, mousedown
, mouseup
, mouseover
, click
, touchstart
, touchmove
, and touchend
for potential security reasons - I will deal with this soon (maybe)
import { rehydrateSerialisedEvent, serialiseEvent } from 'event-replay-helpers'
// the serialiseEvent function also accepts an optional startTimeStamp (number) - useful for recording a bunch of events with offsets to play them back at
document.addEventListener('click', (e) => {
// serialise it, this can be sent to the server and stored in a database if you like
const serialisedEvent = serialiseEvent(e)
// wait a second and play it again
setTimeout(() => {
// this actually a function that dispatches the event when we call it, then returns the event as it's result
const dispatchEvent = rehydrateSerialisedEvent(e)
const rehydratedEvent = dispatchEvent()
}, 1000)
})
To better understand how it works and how to use it, just have a look at the index.ts
- it's only ~130 lines of code.
FAQs
Helpers for serialising and rehydrating JavaScript mouse and touch events
The npm package event-replay-helpers receives a total of 1 weekly downloads. As such, event-replay-helpers popularity was classified as not popular.
We found that event-replay-helpers 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.