New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

activity-loop

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

activity-loop - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

12

dist/index.js

@@ -55,2 +55,4 @@ 'use strict';

this.mousePos = [];
if (typeof activity === 'function') {

@@ -98,3 +100,7 @@ this.on('activity', activity.bind(this));

key: 'activity',
value: function activity() {
value: function activity(e) {
if (e && e.type === 'mousemove' && e.clientX === this.mousePos[0] && e.clientY === this.mousePos[1]) {
return;
}
if (this.paused) {

@@ -105,2 +111,6 @@ return;

this.restart();
if (e) {
this.mousePos = [e.clientX, e.clientY];
}
}

@@ -107,0 +117,0 @@ }, {

2

package.json
{
"name": "activity-loop",
"version": "1.1.2",
"version": "1.1.3",
"description": "Checks whether a user interaction happened on the given element",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -71,3 +71,23 @@ activity-loop

### .pause([paused], [options])
#### paused
Whether the loop has to be paused
Type: `Boolean`
Default: `true`
#### options
Type: `Object`
Default: `{}`
##### options.activity
You can enforce an immediate `activity` event to be fired after coming back from paused mode
Type: `Boolean`
Default: `false`
The loop instance is an [event emitter](https://nodejs.org/api/events.html) so you can do the following:

@@ -74,0 +94,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc