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

react-slot-counter

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-slot-counter - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

1

lib/index.d.ts

@@ -19,2 +19,3 @@ import React from 'react';

dummyCharacterCount?: number;
direction?: 'bottom-up' | 'top-down';
}) => void;

@@ -21,0 +22,0 @@ }

4

lib/index.esm.js

@@ -284,2 +284,3 @@ import React, { memo, useState, useRef, useEffect, forwardRef, useMemo, useCallback, useImperativeHandle } from 'react';

}, valueList.map(function (v, i) {
var _a;
var isChanged = isChangedValueIndexList.includes(i);

@@ -289,3 +290,4 @@ var delay = (isChanged ? isChangedValueIndexList.indexOf(i) : 0) * calculatedInterval;

var prevValue = prevValueRef.current;
var reverseAnimation = value != null && prevValue != null && isNumeric(value) ? toNumeric(value) < toNumeric(prevValue) : false;
var isDecrease = value != null && prevValue != null && isNumeric(value);
var reverseAnimation = ((_a = startAnimationOptionsRef.current) === null || _a === void 0 ? void 0 : _a.direction) === 'top-down' || (isDecrease ? toNumeric(value) < toNumeric(prevValue) : false);
if (SEPARATOR.includes(v)) {

@@ -292,0 +294,0 @@ return React.createElement("div", {

@@ -286,2 +286,3 @@ 'use strict';

}, valueList.map(function (v, i) {
var _a;
var isChanged = isChangedValueIndexList.includes(i);

@@ -291,3 +292,4 @@ var delay = (isChanged ? isChangedValueIndexList.indexOf(i) : 0) * calculatedInterval;

var prevValue = prevValueRef.current;
var reverseAnimation = value != null && prevValue != null && isNumeric(value) ? toNumeric(value) < toNumeric(prevValue) : false;
var isDecrease = value != null && prevValue != null && isNumeric(value);
var reverseAnimation = ((_a = startAnimationOptionsRef.current) === null || _a === void 0 ? void 0 : _a.direction) === 'top-down' || (isDecrease ? toNumeric(value) < toNumeric(prevValue) : false);
if (SEPARATOR.includes(v)) {

@@ -294,0 +296,0 @@ return React.createElement("div", {

{
"name": "react-slot-counter",
"version": "1.5.0",
"version": "1.6.0",
"description": "A versatile and engaging component to display numbers in a captivating slot machine UI, perfect for enhancing user experience and grabbing attention in your web projects",

@@ -5,0 +5,0 @@ "author": "almond-bongbong",

@@ -90,2 +90,3 @@ # react-slot-counter

- `dummyCharacterCount`: The number of dummy characters to be displayed in the animation before reaching the target character. Overrides the `dummyCharacterCount` prop.
- `direction`: This option determines the direction of the slot machine animation. The accepted values are `bottom-top` and `top-bottom`. The default value is `bottom-top`. If `bottom-top` is chosen, the animation will start from the bottom and move towards the top. If `top-bottom` is chosen, the animation will start from the top and move downwards.

@@ -92,0 +93,0 @@ Example:

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