The If Works / This dirt was a building before The If Works Feed
  • ARCHIVE / Reiterate
  • Reiterate 1.3

    Tiny update: after adding 16 characters (”this._object || “), Reiterate is now compatible with Prototype 1.6.0’s revised Hash API. Also, the gzipped copy is now even smaller, thanks to a different compression strategy. Essentially, when using Packer (or PackR for that matter), using ’shrink variables’ plus gzip compression will result in the smallest an fastest-to-execute [...]

    Posted on Nov 14.07 to JavaScript, Prototype, Reiterate   Add a Comment   

  • Reiterate 1.2: operators are (kind of) methods now!

    You know how, in Ruby, + is a method? Well guess what:
    // Count members within a range
    numbers.findAll({’>': 4, ‘<=’: 27}).length

    // Remove items of a specific type
    collection.reject(['instanceof', String])

    // Assign default values to a collection
    [27, 0, 'prototype', '', true, false].map({’||’: ‘foo’})
    // -> [27, "foo", "prototype", "foo", true, "foo"]
    How’s about that then?

    Posted on Sep 27.07 to JavaScript, Prototype, Reiterate   Add a Comment   

  • Announcing Reiterate

    Following on from yesterday’s post, I went a little crazy and expanded the idea of #toFunction to Array and Hash. The end result is Reiterate, which gives you a stack of neat ways to make your JavaScript code more concise and expressive. For example:
    var strings = array.map(’toLowerCase.toArray’);

    var divs = someDivs.findAll({hasClassName: ‘myClass’, visible: true});
    More information on [...]

    Posted on Sep 21.07 to JavaScript, Prototype, Reiterate   Add a Comment   

INSIDE    ←


The If Works


FUN / PAGES

  • Flagger
  • Grape
  • Reiterate

    FIND / SEARCH


FEEDS / RSS

  • Entries
  • Comments

FOOTER / LEST WE FORGET
Copyright © 2007–2008 by The If Works, unless otherwise noted. All rights reserved. Powered by WordPress. Modio theme by Upstart Blogger.