Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

native-carousel

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-carousel - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

.npmignore

4

package.json
{
"name": "native-carousel",
"version": "1.0.0",
"description": "Native JavaScript dead simple carousel",
"version": "1.0.2",
"description": "Native JavaScript simple carousel",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -6,3 +6,2 @@ /*

import throttle from './throttle.js';
import {addListener, removeListener} from './moveListeners.js';

@@ -88,4 +87,6 @@ const defaults = {

if (listenForDrag){
const coords = this.getPointerCoordinates(e);
this.dragParams = {
...this.getPointerCoordinates(e),
x: coords.x,
y: coords.y,
diff: 0,

@@ -96,4 +97,6 @@ currentLeftPosition: currentLeftPosition

clearInterval(this.animationInterval);
addListener('move', this.onDrag);
addListener('up', this.toggleDrag);
window.addEventListener('mousemove', this.onDrag);
window.addEventListener('touchmove', this.onDrag);
window.addEventListener('mouseup', this.toggleDrag);
window.addEventListener('touchend', this.toggleDrag);
} else {

@@ -104,4 +107,6 @@ this.dragParams = null;

if (this.animate) this.startAnimation();
removeListener('move', this.onDrag);
removeListener('up', this.toggleDrag);
window.removeEventListener('mousemove', this.onDrag);
window.removeEventListener('touchmove', this.onDrag);
window.removeEventListener('mouseup', this.toggleDrag);
window.removeEventListener('touchend', this.toggleDrag);
}

@@ -108,0 +113,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