Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
gitart-animate-number
Advanced tools
A simple utility to animate a single number. The number changes on each frame (by requestAnimationFrame).
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. The package can animate a few fields and control the animation timelines.
import { animate } from '@gitart/animate-number'
animate({
from: 0,
to: 500,
duration: 1000,
on: (value) => {
console.log('value: ', value)
},
}
type Animate = (
params: IParams,
): StopAnimationFn
interface IParams {
/**
* start value
*/
from: number
/**
* end value
*/
to: number
/**
* milliseconds
*/
duration: number
/**
* bezier curve parameters
*/
bezier?: BezierParams
/**
* a callback called many times (on requestAnimationFrame) until the animation is complete.
* the current progress is passed as the first parameter.
*/
on: (value: CurrentValue) => void
/**
* is called when the animation is stopped manually.
* @param value - last value passed to `on` callback
*/
stopped?: (value: CurrentValue) => void
/**
* is called when the animation is completed.
* @param value - equal to the `to` parameter of the function. the final value
*/
completed?: (value: CurrentValue) => void
/**
* is called when the animation is completed or stopped.
* @param value - last value passed to `on` callback
*/
done?: (value: CurrentValue) => void
}
FAQs
Animate number changes. Lightweight and easy to use. Bezier curves, easing functions, and more.
The npm package gitart-animate-number receives a total of 140 weekly downloads. As such, gitart-animate-number popularity was classified as not popular.
We found that gitart-animate-number demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.