Socket
Socket
Sign inDemoInstall

nuka-carousel

Package Overview
Dependencies
Maintainers
17
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuka-carousel - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

6

dist/index.js

@@ -191,5 +191,7 @@ "use strict";

const remainder = scrollWidth - visibleWidth;
if (visibleWidth === 0)
return;
switch (scrollDistance) {
case "screen": {
const pageCount = Math.ceil(scrollWidth / visibleWidth);
const pageCount = Math.round(scrollWidth / visibleWidth);
setTotalPages(pageCount);

@@ -211,3 +213,3 @@ setScrollOffset(arraySeq(pageCount, visibleWidth));

default: {
if (typeof scrollDistance === "number") {
if (typeof scrollDistance === "number" && scrollDistance > 0) {
const pageCount = Math.ceil(remainder / scrollDistance) + 1;

@@ -214,0 +216,0 @@ setTotalPages(pageCount);

{
"name": "nuka-carousel",
"version": "8.0.0",
"version": "8.0.1",
"description": "Pure React Carousel",

@@ -78,3 +78,3 @@ "main": "dist/index.js",

"test:ci": "pnpm run test:unit:ci",
"test:unit": "jest --testPathIgnorePatterns=\\(/es /lib\\)",
"test:unit": "jest",
"test:unit:ci": "pnpm run test:unit",

@@ -81,0 +81,0 @@ "test:unit:watch": "pnpm run test:unit --watchAll",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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