Sugar v1.1 Release Notes

  • API Changes

    • Array#unique can now unique on a function, giving a shortcut to uniquify deep objects
    • Object.equals renamed to Object.equal in its class method only
    • Object.equal now much more robust, can handle cyclic references, etc
    • Number#format now accepts a parameter for the decimal. "thousands", and "decimal" are pushed to 2nd and 3rd params
    • ๐Ÿšš Date#format now accepts different format tokens. A few counterintuitive ones removed, and others were added to match moment.js including fff, ddd, mmm, etc
    • Function#lazy now executes immediately and locks instead of setting a delay
    • โž• Added RegExp#getFlags
    • โž• Added Function#fill, which allows arguments to be intelligently curried
    • ๐Ÿ›  Fixed broken support for SpiderMonkey under CouchDB
    • ๐Ÿ›  Fixed sortBy is unintentionally destructive
    • Full Asian date number formats now accepted
    • Array#map/min/max/most/least/groupBy/sortBy no longer errors on undefined, null, etc
    • ๐Ÿ›  Fixed a bug with locking on Number#format when passing digits

    Internal Changes

    • โšก๏ธ Optimized for Google closure compilers max compression level
    • Minified script dropped about 5kb
    • ๐Ÿ‘ฏ Intelligently determining if cloned objects are extended
    • transformArgument now just accepts not the arguments object
    • ๐Ÿ”จ refactored asian digits to be globally replaced
    • Date#toJSON and Date#toISOString now properly fall back to native methods
    • โœ… Significantly wrote asynchronous function tests to be more reliable