Stampit 0.2 Released

Uncategorized 4 4 Comments

Stampit lets you create objects from reusable, composable behaviors. Instead of pretending that JavaScript is class-based, stampit embraces the power and flexibility of prototypes (see “Three Different Kinds of Prototypal OO”). It produces object factories which you can then compose to create more factories. When it’s time to instantiate your objects, just call the function that stampit returns. Out pops an object, with all the properties, methods, and private state you composed.

But it gets even better. Now Stampit makes it even easier to compose exactly the factory you want. You can chain .methods() and .state(), and it will combine the last object you passed into them with all the previous objects you’ve passed in.

For example:

Download the latest:

You can also grab it directly from Github.

  1. Max Shishkin - May 18, 2013

    Great! Will you also register it as a Bower package? It’d be convenient.

    • Eric Elliott - May 18, 2013

      I’m not opposed to it. I’m currently migrating it to Node + Browserify, and I’ll use Browserify to generate a UMD module that plays nice with Bower.

    • Eric Elliott - May 19, 2013

      Done, I think. I registered the package anyway. Give it a try and let me know if it works. (As I mentioned, I prefer Browserify).

  2. Max Shishkin - May 20, 2013

    Yes, everything is working as expected, thanks!

    I’m using it in a Yeoman-powered project, so i’m stuck with RequireJS and Bower for now.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">