
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
runFor(fn, ms)Run requestAnimationFrame for the specified duration.
npm install --save runfor
or
yarn add runfor
runFor(progressFn, msDuration);
import runFor from 'runfor';
function moveX(progress) {
// Move right 200px
div.style.transform = `translateX(${progress * 200}px`;
}
// Run moveX for 1sec with a progress between 0 and 1.
runFor(p => moveX(p), 1000);
Check the examples/ folder to see full examples.
Optionally you can stop or start the animation with this functions:
const runner = runFor(fn, 1000);
runner.toggle()
runner.stop()
runner.start()
.stop()Stops the animation.
.start()Starts the animation keeping the previous progress.
.toggle()Toggle start / stop.
.restart()Restart animation from the beginning
yarn install
yarn run dev
yarn test
FAQs
Run a performant function for a period of time
The npm package runfor receives a total of 11 weekly downloads. As such, runfor popularity was classified as not popular.
We found that runfor demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.