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

react-countup

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-countup - npm Package Compare versions

Comparing version 4.3.0 to 4.3.1

58

index.d.ts
import * as React from 'react';
type Function = () => void;
interface CallbackProps {
onEnd?: (providedFn: {
pauseResume: Function;
reset: Function;
start: Function;
update: Function;
}) => void;
onStart?: (providedFn: {
pauseResume: Function;
reset: Function;
start: Function;
update: Function;
}) => void;
onPauseResume?: (providedFn: {
reset: Function;
start: Function;
update: Function;
}) => void;
onReset?: (providedFn: {
pauseResume: Function;
start: Function;
update: Function;
}) => void;
onUpdate?: (providedFn: {
pauseResume: Function;
reset: Function;
start: Function;
}) => void;
}
export interface RenderCounterProps {
countUpRef: React.RefObject<any>;
start?: () => void;
pauseResume?: () => void;
reset?: () => void;
start?: Function;
pauseResume?: Function;
reset?: Function;
update?: (newEnd?: number) => void;
}
export interface CountUpProps {
export interface CountUpProps extends CallbackProps {
className?: string;

@@ -27,7 +59,2 @@ decimal?: string;

formattingFn?: (n: number) => string;
onEnd?: ({ pauseResume, reset, start, update }) => void;
onStart?: ({ pauseResume, reset, start, update }) => void;
onPauseResume?: ({ reset, start, update }) => void;
onReset?: ({ pauseResume, start, update }) => void;
onUpdate?: ({ pauseResume, reset, start }) => void;
children?: (props: RenderCounterProps) => JSX.Element;

@@ -38,3 +65,3 @@ }

export interface useCountUpProps {
export interface useCountUpProps extends CallbackProps {
startOnMount?: boolean;

@@ -45,7 +72,2 @@ start?: number;

duration?: number;
onReset?: ({ pauseResume, start, update }) => void;
onUpdate?: ({ pauseResume, reset, start }) => void;
onPauseResume?: ({ reset, start, update }) => void;
onStart?: ({ pauseResume, reset, start, update }) => void;
onEnd?: ({ pauseResume, reset, start, update }) => void;
}

@@ -57,5 +79,5 @@

countUp: number | string;
start: () => void;
pauseResume: () => void;
reset: () => void;
start: Function;
pauseResume: Function;
reset: Function;
update: (newEnd?: number) => void;

@@ -62,0 +84,0 @@ };

{
"name": "react-countup",
"version": "4.3.0",
"version": "4.3.1",
"description": "A React component wrapper around CountUp.js",

@@ -41,8 +41,8 @@ "author": "Glenn Reyes <glenn@glennreyes.com> (https://twitter.com/glnnrys)",

"devDependencies": {
"@babel/core": "7.7.5",
"@babel/core": "7.7.7",
"@babel/plugin-proposal-class-properties": "7.7.4",
"@babel/preset-env": "7.7.6",
"@babel/preset-env": "7.7.7",
"@babel/preset-react": "7.7.4",
"@testing-library/react": "9.4.0",
"@testing-library/react-hooks": "^3.2.1",
"@testing-library/react-hooks": "3.2.1",
"babel-jest": "24.9.0",

@@ -56,6 +56,6 @@ "husky": "3.1.0",

"react-dom": "16.12.0",
"react-test-renderer": "^16.12.0",
"rollup": "1.27.12",
"react-test-renderer": "16.12.0",
"rollup": "1.27.13",
"rollup-plugin-babel": "4.3.3"
}
}
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