Socket
Socket
Sign inDemoInstall

react-touch-carousel

Package Overview
Dependencies
11
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.2 to 0.8.3

lib/utils.test.js

8

lib/index.js

@@ -6,3 +6,3 @@ 'use strict';

});
exports.omit = exports.getTouchId = exports.getTouchPosition = exports.precision = exports.clamp = exports.range = undefined;
exports.modCursor = exports.omit = exports.getTouchId = exports.getTouchPosition = exports.precision = exports.clamp = exports.range = undefined;

@@ -47,2 +47,8 @@ var _utils = require('./utils');

});
Object.defineProperty(exports, 'modCursor', {
enumerable: true,
get: function get() {
return _utils.modCursor;
}
});

@@ -49,0 +55,0 @@ var _TouchCarousel = require('./TouchCarousel');

8

lib/TouchCarousel.js

@@ -287,9 +287,3 @@ 'use strict';

var newCursor = cursor;
while (newCursor > 0) {
newCursor -= cardCount;
}
while (newCursor < 1 - cardCount) {
newCursor += cardCount;
}
var newCursor = (0, _utils.modCursor)(cursor, cardCount);
if (newCursor !== cursor) {

@@ -296,0 +290,0 @@ _this.modAs(newCursor).then(resolve);

@@ -12,2 +12,3 @@ "use strict";

exports.omit = omit;
exports.modCursor = modCursor;
function range(start, end) {

@@ -55,1 +56,12 @@ var ret = [];

function modCursor(cursor, cardCount) {
var newCursor = cursor;
while (newCursor > 0) {
newCursor -= cardCount;
}
while (newCursor < 0.5 - cardCount) {
newCursor += cardCount;
}
return newCursor;
}
{
"name": "react-touch-carousel",
"version": "0.8.2",
"version": "0.8.3",
"description": "Micro carousel framework for React.JS",

@@ -10,5 +10,6 @@ "main": "lib/index.js",

"scripts": {
"test": "npm run lint",
"test": "npm run lint && npm run spec",
"lint": "standard",
"lint:fix": "standard --fix",
"spec": "ava",
"prebuild": "mkdir -p lib",

@@ -36,6 +37,7 @@ "build": "for js in src/*.js; do babel $js > \"lib/$(basename $js)\"; done",

"devDependencies": {
"ava": "0.25",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "8.0.1",
"babel-loader": "7.1.2",
"babel-core": "6.26.3",
"babel-eslint": "8.2.3",
"babel-loader": "7.1.4",
"babel-plugin-transform-class-properties": "6.24.1",

@@ -46,12 +48,12 @@ "babel-plugin-transform-object-rest-spread": "6.26.0",

"classnames": "2.2.5",
"css-loader": "0.28.7",
"css-loader": "0.28.11",
"html-webpack-plugin": "2.30.1",
"raw-loader": "0.5.1",
"react": "16.2.0",
"react-dom": "16.2.0",
"standard": "10.0.3",
"react": "16.4.0",
"react-dom": "16.4.0",
"standard": "11.0.1",
"standard-loader": "^6.0.1",
"style-loader": "0.19.1",
"uglify-js": "3.1.2",
"watchify": "3.9.0",
"style-loader": "0.21.0",
"uglify-js": "3.4.0",
"watchify": "3.11.0",
"webpack": "3.6.0",

@@ -69,3 +71,9 @@ "webpack-dev-server": "2.9.1"

"parser": "babel-eslint"
},
"ava": {
"require": [
"babel-register"
],
"babel": "inherit"
}
}

@@ -191,3 +191,3 @@ [![Build Status](https://travis-ci.org/xiaody/react-touch-carousel.svg?branch=master)](https://travis-ci.org/xiaody/react-touch-carousel)

We provide an HOC for basic mouse support. Internally it simulates touch events with the mouse events.
We provide an HOC for very basic mouse support. Internally it simulates touch events with the mouse events.

@@ -194,0 +194,0 @@ ```jsx

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc