Commits on Mar 6, 2010
  1. @joshholt

    Forgot to add version

    joshholt committed Mar 5, 2010
  2. @joshholt
Commits on Feb 27, 2010
  1. @jashkenas
  2. @mrjjwright

    added _.isBoolean function

    mrjjwright committed Feb 26, 2010
Commits on Feb 26, 2010
  1. @ratbeard
Commits on Feb 24, 2010
  1. @jashkenas

    Changelog bump.

    jashkenas committed Feb 24, 2010
  2. @jashkenas
  3. @jashkenas
  4. @jashkenas
  5. @jashkenas
  6. @jashkenas

    move the OOP-setup bits down into that section for clarity. JavaScrip…

    …t allows this it's pre-declaration pass.
    jashkenas committed Feb 24, 2010
  7. @jashkenas

    adding an _.mixin utility function that allows you to add functions t…

    …o Underscore (also used internally)
    jashkenas committed Feb 24, 2010
  8. @jashkenas
  9. @jashkenas
  10. @jashkenas

    reverted _.buildLookup, restoring _.without to it's previous implemen…

    …tation, adding a test for object identity
    jashkenas committed Feb 24, 2010
  11. @jashkenas
  12. @jashkenas
  13. @jashkenas

    remove the advanced_optimizations concessions and the advanced_optimi…

    …zations rake task. Simple will do.
    jashkenas committed Feb 24, 2010
  14. @jashkenas

    camelcase conventions

    jashkenas committed Feb 24, 2010
  15. @jashkenas
  16. @jashkenas

    merging ratbeard/closure

    jashkenas committed Feb 24, 2010
  17. @jashkenas
  18. @jashkenas

    merging rlfletchers branch with a safer _.template when the template …

    …delimiter includes RegExp characters.
    jashkenas committed Feb 24, 2010
  19. @rfletcher
  20. @rfletcher
  21. @rfletcher
  22. @ratbeard

    only initWrapper() once. make wrapper constructor accessable as `_._w…

    Previously, there was no way to get at the OO wrapper object.
    So if a user added a custom method on to _, or defined a custom
    alias, it would not be reflected in the wrapper.  Now it is at
    least possible, though there is no API to do it.  I alluded to
    making one in my commit that added _.alias() (which I recently reverted,
    as it added weight to the stripped version), but honestly I think
    the wrapping behavior should go in to a seperate library, not because
    it is bad, but because it is an awesome pattern that I want to use
    on objects other than underscore.
    ratbeard committed Feb 23, 2010
  23. @ratbeard
  24. @ratbeard

    make _.initWrapper() that builds the wrapper prototye

    The intention is that underscore Consumers MUST call _.initWrapper()
    in their code to allow the OO style usage, or a runtime error is thrown.
    This would break backwards compatability, so for the moment I call
    initWrapper myself at the end of underscore.
    However, if I comment out my call to initWrapper and don't call it
    in user code, then the compiler can strip an empty underscore with
    no user code from 2137 -> 100 bytes.  Making the user explicitly say
    they want OO wrapping is the only way to achieve this, otherwise the
    compiler will always keep the OO wrapper code around.
    ratbeard committed Feb 23, 2010
Commits on Feb 23, 2010
  1. @ratbeard

    Re-arrange baseline setup section.

    Put all variable declartions in a row, so they can all be
    chained together with commas by compiler.
    Move wrapper creation code down in OO section.  Not necissary
    for `var wrapper` to be defined when _ constructor is defined.
    Preparing way to make OO wrapping optional..
    ratbeard committed Feb 23, 2010
  2. @ratbeard

    Revert "Create #alias method, callable on any object, _ by default."

    This reverts commit c43de54.
    ratbeard committed Feb 23, 2010
  3. @ratbeard

    use `var native_reduceRight` etc. variables instead of `Native = { re…

    …duceRight: ... }`
    This way we only get the native versions of functions we use.
    Will make testing non-native versions as we can't just swap do `_.Native = {}`,
    but this wouldn't have worked for `isArray` and `keys` anyways, as these are
    looked up on initialization, so I think the solution is to have an init()
    method on underscore where we will re-initialize functions and try and use
    native versions then
    ratbeard committed Feb 23, 2010
  4. @ratbeard

    Add rake task to build with closure advanced optimizations.

    You would use this to compile your code _with_ underscore, to
    remove all those dead underscore functions you don't use.
    Slight tweak to code to `root._` code to get working, and must
    remove anonymous wrapper function for current closure compiler to
    remove dead code.
    ratbeard committed Feb 23, 2010
Commits on Feb 22, 2010
  1. @ratbeard

    make a local variable that points to Array.prototype since the former…

    … is not min'd down.
    Won't effect gzip size, but reduces min size.  Saves about:
    15 bytes per instance * 13 instances ≅ 200 bytes
    ratbeard committed Feb 22, 2010
  2. @ratbeard

    Much better strategy for calling native Array methods.

    Compare an object's function with === to the native
    version before calling it.  That is, don't just assume that
    because an object has a 'filter' property thats a function,
    that we should call that in _.filter().
    Expose the native methods found as _.native
    On the way towards being able to turn off native implementations,
    though there are tradeoffs...
    ratbeard committed Feb 22, 2010