New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reactjs-countdown-hook

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactjs-countdown-hook - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

12

dist/index.es.js

@@ -137,3 +137,3 @@ import { useState, useEffect } from 'react';

intervalId = setInterval(function () {
if (counter >= 1) {
if (counter.count >= 1) {
setCounter(function (counter) {

@@ -152,6 +152,6 @@ return _objectSpread2(_objectSpread2({}, counter), {}, {

var secondCounter = counter % 60;
var minuteCounter = Math.floor(counter % 3600 / 60);
var hourCounter = Math.floor(counter % (3600 * 24) / 3600);
var daysCounter = Math.floor(counter / (3600 * 24));
var secondCounter = counter.count % 60;
var minuteCounter = Math.floor(counter.count % 3600 / 60);
var hourCounter = Math.floor(counter.count % (3600 * 24) / 3600);
var daysCounter = Math.floor(counter.count / (3600 * 24));
var computedSecond = String(secondCounter).length === 1 ? "0".concat(secondCounter) : secondCounter;

@@ -175,3 +175,3 @@ var computedMinute = String(minuteCounter).length === 1 ? "0".concat(minuteCounter) : minuteCounter;

};
}, [isActive, counter, onFinish]);
}, [isActive, counter.count, onFinish]);

@@ -178,0 +178,0 @@ function pause() {

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

intervalId = setInterval(function () {
if (counter >= 1) {
if (counter.count >= 1) {
setCounter(function (counter) {

@@ -159,6 +159,6 @@ return _objectSpread2(_objectSpread2({}, counter), {}, {

var secondCounter = counter % 60;
var minuteCounter = Math.floor(counter % 3600 / 60);
var hourCounter = Math.floor(counter % (3600 * 24) / 3600);
var daysCounter = Math.floor(counter / (3600 * 24));
var secondCounter = counter.count % 60;
var minuteCounter = Math.floor(counter.count % 3600 / 60);
var hourCounter = Math.floor(counter.count % (3600 * 24) / 3600);
var daysCounter = Math.floor(counter.count / (3600 * 24));
var computedSecond = String(secondCounter).length === 1 ? "0".concat(secondCounter) : secondCounter;

@@ -182,3 +182,3 @@ var computedMinute = String(minuteCounter).length === 1 ? "0".concat(minuteCounter) : minuteCounter;

};
}, [isActive, counter, onFinish]);
}, [isActive, counter.count, onFinish]);

@@ -185,0 +185,0 @@ function pause() {

@@ -11,4 +11,3 @@ {

"react-dom": "^16.9.0",
"react-scripts": "^3.0.1",
"reactjs-countdown-hook": "^1.0.3"
"react-scripts": "^3.0.1"
},

@@ -15,0 +14,0 @@ "scripts": {

{
"name": "reactjs-countdown-hook",
"version": "1.0.4",
"version": "1.0.5",
"description": "a simple count down timer hook for react with formatting",

@@ -5,0 +5,0 @@ "author": "hoseinhamzei",

@@ -18,3 +18,3 @@ import React, { useState, useEffect } from "react";

intervalId = setInterval(() => {
if (counter >= 1) {
if (counter.count >= 1) {
setCounter((counter) => ({ ...counter, count: counter.count - 1 }));

@@ -28,6 +28,6 @@ } else {

const secondCounter = counter % 60;
const minuteCounter = Math.floor((counter % 3600) / 60);
const hourCounter = Math.floor((counter % (3600 * 24)) / 3600);
const daysCounter = Math.floor(counter / (3600 * 24));
const secondCounter = counter.count % 60;
const minuteCounter = Math.floor((counter.count % 3600) / 60);
const hourCounter = Math.floor((counter.count % (3600 * 24)) / 3600);
const daysCounter = Math.floor(counter.count / (3600 * 24));

@@ -58,3 +58,3 @@ const computedSecond =

return () => clearInterval(intervalId);
}, [isActive, counter, onFinish]);
}, [isActive, counter.count, onFinish]);

@@ -61,0 +61,0 @@ function pause() {

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 too big to display

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