
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@terrahq/counter
Advanced tools
`Counter` is a JavaScript class for animating a numeric counter that starts when scrolled into view. It uses GSAP and ScrollTrigger to animate a number from an initial to a final value with customizable options.
Counter is a JavaScript class for animating a numeric counter that starts when scrolled into view. It uses GSAP and ScrollTrigger to animate a number from an initial to a final value with customizable options.
import Counter from "@terrahq/counter";
const counter = new Counter({
element: document.querySelector(".counter-element"),
duration: 2, // Duration of the animation in seconds
separator: ".", // Thousands separator (optional)
start: "top center", // ScrollTrigger start position (optional)
debug: true, // Display ScrollTrigger markers (optional, now called debug)
easing: "power1.out", // Easing of the animation (optional)
autoPlay: true, // Start animation on scroll (optional)
playOnce: true, // Run animation only once (optional)
decimalPlaces: 0, // Where the '.' will be located when it is a decimal number (optional)
onComplete: () => console.log("Counter animation complete!"), // Callback on animation complete
});
// Additional methods
counter.play(); // Start the animation manually
counter.update(); // Update the ScrollTrigger position
counter.destroy(); // Clean up the instance and stop animations
<div class="counter counter-element">1</div>
const counter = new Counter({
element: document.querySelector(".counter-element"),
duration: 2, // Duration of the animation in seconds
separator: ".", // Thousands separator (optional)
start: "top center", // ScrollTrigger start position (optional)
debug: true, // Display ScrollTrigger markers (optional, now called debug)
easing: "power1.out", // Easing of the animation (optional)
autoPlay: true, // Start animation on scroll (optional)
playOnce: true, // Run animation only once (optional)
decimalPlaces: 0, // Where the '.' will be located when it is a decimal number (optional)
onComplete: () => console.log("Counter animation complete!"), // Callback on animation complete
});
FAQs
`Counter` is a JavaScript class for animating a numeric counter that starts when scrolled into view. It uses GSAP and ScrollTrigger to animate a number from an initial to a final value with customizable options.
We found that @terrahq/counter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.