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

gitart-animate-number

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitart-animate-number - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

dist/animateUsingInterval.d.ts

16

dist/animate.d.ts

@@ -1,17 +0,5 @@

import type { IAnimateByIntervalParams, IParams, StopAnimationFn } from './types';
import type { IParams, StopAnimationFn } from './types';
/**
* animate number using `setInterval`
*/
export declare const animateUsingInterval: ({ from, to, duration, fps, bezier, on, completed, stopped, done, }: IAnimateByIntervalParams) => StopAnimationFn;
/**
* animate number using `requestAnimationFrame`
*/
export declare const animateUsingRAF: ({ from, to, duration, bezier, on, completed, stopped, done, }: IParams) => StopAnimationFn;
/**
* animate number using `requestAnimationFrame`
*/
export declare function animate(params: IParams, type?: 'raf'): StopAnimationFn;
/**
* animate number using `setInterval`
*/
export declare function animate(params: IAnimateByIntervalParams, type?: 'interval'): StopAnimationFn;
export declare const animate: ({ from, to, duration, bezier, on, completed, stopped, done, }: IParams) => StopAnimationFn;
export type { IParams, IAnimateByIntervalParams, BezierParams } from './types';
export { animate, animateUsingInterval, animateUsingRAF } from './animate';
export { animateUsingInterval } from './animateUsingInterval';
export { animate } from './animate';
export { easingTypes } from './config';
{
"name": "gitart-animate-number",
"version": "0.0.3",
"version": "0.1.0",
"license": "MIT",

@@ -40,5 +40,5 @@ "repository": {

"typescript": "^4.4.4",
"vite": "^2.7.2",
"vitest": "^0.1.27"
"vite": "^2.8.6",
"vitest": "^0.7.10"
}
}
# Animate Number
A simple utility to animate a single number.
A simple utility to animate a single number. The number changes on each frame (by requestAnimationFrame).
For more complex cases you can take a look at the [shifty](https://www.npmjs.com/package/shifty). The package can animate a few fields and control the animation timelines.
For more complex cases, you can take a look at the [shifty](https://www.npmjs.com/package/shifty).
The package can animate a few fields and control the animation timelines.

@@ -26,4 +27,3 @@ ## Usage

type Animate = (
params: IParams | IAnimateByIntervalParams,
type: 'raf' | 'interval' = 'raf'
params: IParams,
): StopAnimationFn

@@ -55,3 +55,3 @@ ```

/**
* a callback that is called many times until the animation is complete.
* a callback called many times (on requestAnimationFrame) until the animation is complete.
* the current progress is passed as the first parameter.

@@ -58,0 +58,0 @@ */

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