npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

temple-animate

v1.0.2

Published

Simple animation for Temple.

Readme

Temple Animate

Simple animation for Temple.

Install

Download the latest version dist/ folder and use via a script tag. The variable Animate will be attached to Temple.

<script type="text/javascript" src="temple.js"></script>
<script type="text/javascript" src="temple.animate.js"></script>

If using Browserify or Node.js, you can install via NPM and use via require("temple-animate").

$ npm install temple-animate

Usage

animate

view.animate(path, to [, options ])

This plugin adds an .animate() method to Temple views. It is very similar to .set(), except that it will change the value over time instead of instantly. Keep in mind that both to and the existing value must be numbers or an error will be thrown. This method returns a valid Promise that resolves when the animation completes. If an existing animation is running at the path, it is completed immediately.

Valid options:

  • duration — The number of milliseconds to run the animation for.
  • easing — Either a string name of a preset easing function or a function that will take tick (float between 0 and 1) and should return a computed tick value. This controls how a value reaches its result.
  • repeat — Instead of completing, the animation will continue to animate in the reverse direction. Pass true to repeat infinitely, or pass a number to limit the number of repeats. The limit does not include the initial run, so a value of 1 will cause the animation to run a total of two times (out and back). Call stopAnimating() to stop a repeating animation.
  • complete — A function that is called when the animation completes.

stopAnimating

view.stopAnimating(path)

This will cause an existing animation at path to complete immediately. This will not set the value at path to to and will instead leave the value untouched.

Example

The following example animates a div's width and height between 10px and 200px, infinitely.

var view = new Temple({ size: 10 });

view.render = function() {
    var model = this.getModel(),
        div = new Temple.Element("div");

    div.attr("style", function() {
        var size = model.get("size") + "px";
        
        return "background-color: blue;"
             + "width: " + size + ";"
             + "height: " + size + ";"
    });

    return div;
}

view.use(Temple.Animate);
view.paint(document.body);

view.animate("size", 200, {
    easing: "easeInOutQuad",
    duration: 500,
    repeat: true
});