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.
@seregpie/claw
Advanced tools
Readme
A very small gesture recognizer.
npm install @seregpie/claw
import Claw from '@seregpie/claw';
<script src="https://unpkg.com/@seregpie/claw"></script>
.constructor(target, {
delay = 500,
distance = 1,
})
argument | description |
---|---|
target | The target element. |
delay | The delay threshold to separate the event types. |
distance | The distance threshold to separate the event types. |
let element = document.getElementById('claw');
(new Claw(element))
.on('panStart', event => {
// handle
})
.on('pan', event => {
// handle
})
.on('panEnd', event => {
// handle
});
.on(type, listener)
chainable
Binds a listener to an event type.
claw.on('tap', event => {
// handle tap event
});
.off(type, listener)
chainable
Unbinds a listener from an event type.
Omit the argument listener
to unbind all listeners from an event type.
Omit the argument type
to unbind all listeners from all event types.
let tapListener = function(event) {
// handle tap event
claw.off('tap', tapListener);
};
claw.on('tap', tapListener);
.isIdle
Returns true
, if there are no bound listeners.
holdStart
{
pointerType,
timeStamp,
x,
y,
}
holdEnd
{
initialTimeStamp,
pointerType,
timeStamp,
x,
y,
}
panStart
{
pointerType,
timeStamp,
x,
y,
}
pan
{
initialTimeStamp,
initialX,
initialY,
pointerType,
previousTimeStamp,
previousX,
previousY,
timeStamp,
x,
y,
}
panEnd
{
initialTimeStamp,
initialX,
initialY,
pointerType,
timeStamp,
x,
y,
}
tap
{
pointerType,
timeStamp,
x,
y,
}
FAQs
A very small gesture recognizer.
The npm package @seregpie/claw receives a total of 126 weekly downloads. As such, @seregpie/claw popularity was classified as not popular.
We found that @seregpie/claw 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.