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

use-carousel-hook

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-carousel-hook - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

4

cjs/useCarousel.js

@@ -26,2 +26,6 @@ "use strict";

const children = [...el.children];
// If scrollWidth or scrollHeight is 0, return the children length
if ((options.direction === 'vertical' && el.scrollHeight === 0) || el.scrollWidth === 0) {
return children.length;
}
const lastScrollableChild = children.findIndex(child => options.direction === 'vertical'

@@ -28,0 +32,0 @@ ? child.offsetTop >= el.scrollHeight - el.offsetHeight

@@ -21,2 +21,6 @@ import { useState, useRef, useEffect, useReducer, useCallback } from 'react';

const children = [...el.children];
// If scrollWidth or scrollHeight is 0, return the children length
if ((options.direction === 'vertical' && el.scrollHeight === 0) || el.scrollWidth === 0) {
return children.length;
}
const lastScrollableChild = children.findIndex(child => options.direction === 'vertical'

@@ -23,0 +27,0 @@ ? child.offsetTop >= el.scrollHeight - el.offsetHeight

2

package.json
{
"name": "use-carousel-hook",
"version": "0.0.13",
"version": "0.0.14",
"description": "Adds functionality for carousels using React hooks",

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

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