All Versions
38
Latest Version
Avg Release Cycle
236 days
Latest Release
1939 days ago

Changelog History
Page 2

  • v1.4.1 Changes

    September 14, 2015

    API Changes

    • ๐Ÿ›  Fix for Object.select/reject not performing value match. (Issue #362)
    • ๐Ÿ›  Fix for Object.merge not properly merging when target object isn't an object (Issue #365)
    • ๐Ÿ›  Fix for development script not running properly in meteor (Issue #361)
  • v1.4.0 Changes

    API Changes

    • โž• Adding generalized ranges for Numbers and Strings in addition to Dates.
    • Date ranges are now part of the Range module and are no longer dependent on the Date module.
    • โž• Adding clamp for ranges and an alias for Number.
    • โž• Adding cap for ranges and an alias for Number.
    • โž• Added String#truncateOnWords. Part of the String#truncate functionality is now here.
    • ๐Ÿ— Array.create will understand ranges and can build an array from one.
    • ๐Ÿ—„ DateRange#duration is deprecated in favor of Range#span.
    • ๐Ÿ›  Fix for relative times with "4 weeks" that are actually past the single month threshold.
    • Number#upto and Number#downto will now work on inverse ranges.
    • pad, padLeft, and padRight now pad to the specified length, instead of simply adding to string.
    • Fuzzy matching methods like findAll now directly match regexes against elements, regardless of whether or not they are strings.
    • Instances of classes are now entirely matched by reference only, as originally intended. This means that any equality checking inside Sugar will consider them equal only if they are ===.
    • ๐Ÿ‘ฏ Object.clone now only works on known object types and does not work on instances of user-created classes.
    • String#assign now can be passed an array as well as enumerated arguments.
    • ๐Ÿ›  Fixed global variable leak #328
    • ๐Ÿšš Optimization for Array#removeAt #324
    • ๐Ÿ›  Fix for isThisWeek being false when not en locale.
    • ๐Ÿ‘ Timezone formatting tokens changed to align with Moment.js better.
    • ๐ŸŽ Major performance optimization for date formatting and more.
    • โž• Added Date#beginningOfISOWeek and Date#endOfISOWeek
    • ๐Ÿ›  Fix for Array#create not working on argument objects of zero-length (Issue #299).
    • ๐Ÿ›  Fix for String#capitalize capitalizing after apostrophes (Issue #325).
    • ๐Ÿ›  Fix for extended objects select and reject returning plain objects.
    • ๐Ÿ›  Fix for Object.merge not merging certain deep objects.
    • โž• Added Date.SugarNewDate to allow customization of internally created dates.
    • โœ‚ Removed multiMatch in favor of a cached matcher system.
    • ๐Ÿ›  Fix for environments where regexes are functions.
    • ๐Ÿ›  Fix for Function#cancel not properly clearing all timers (Issue #346).
    • ๐Ÿ›  Fix for lazy functions not being able to recursively call themselves.
    • โž• Added option immediate to Function#lazy, which is now false by default.
    • โž• Added Function#every.
    • ๐Ÿ”ฆ Exposed Array.AlphanumericSort to allow its use in native Array#sort.
    • โž• Added Array.AlphanumericSortNatural that is on by default and triggers a natural sort.
    • ๐Ÿ›  Fixed strings not being coerced into objects in < IE8.
    • Array.find now aligns with ES6 spec.
    • ๐Ÿ›  Fixed bug with array like objects iterated over with loop = true.
    • ๐Ÿ›  Fixed String#truncate not returning primitives.
    • String#repeat is now aligned more with spec. String#pad follows suit.
    • โž• Added Array#findFrom and Array#findIndexFrom.
    • โœ‚ Removed Range#step alias.
    • โœ‚ Removed deep argument from Object.fromQueryString and replaced with optional boolean casting.

    ๐ŸŽ Performance Enhancements

    • Object.map: up to 682% faster
    • Date#format: up to 21,400% faster
    • Array#min/max/less/more up to 83% faster
    • Enumerable methods like findAll/findIndex/map/any/count/sum/etc.: up to 11,270% faster
    • isString/isNumber/isBoolean: up to 77% faster
    • isEqual returns up front when === (can be much faster). Many methods use this internally as well.
    • Math related functions (and internals that use them): up to 16% faster.
    • getRegExpFlags is up to 1000% faster.
    • Range#every up to 52% faster for dates, 1500% faster for numbers/strings.
    • Array#at and String#at up to 242% faster for single index lookups.
    • String#assign up to 30% faster.
  • v1.3.9 Changes

    API Changes

    • โž• Added Object.toQueryString.
    • ๐Ÿ›  Fix for timezone offset -0330, etc (Issue #262).
    • ๐Ÿ›  Fix for methods like isToday not working when using a non-English locale (Issue #264).
    • โœ‚ Removed Sugar#namespace to fix conflict with jQuery (Issue #265).
  • v1.3.8 Changes

    API Changes

    • ๐Ÿ“‡ Renamed Date#getWeek and Date#setWeek to Date#getISOWeek and Date#setISOWeek.
    • โšก๏ธ Updating Date#setWeek (now Date#setISOWeek) to follow ISO-8601 standard.
    • ๐Ÿ‘ Allowing lazy and throttled functions to return a memoized result, allowing them to double as a caching mechanism.
    • ๐ŸŽ Performance improvement to return early using typeof for type checks.
    • ๐ŸŽ Performance improvement for loops.
    • ๐Ÿ›  Fix for Array#sample sometimes returning undefined (Issue #252).
    • ๐Ÿ›  Fix for French locales (Issue #249).
    • ๐Ÿ›  Fix for conflict with Coffeescript (Issue #248).
    • ๐Ÿ›  Fix for Object.clone not preserving date _utc flag (Issue #256).
  • v1.3.7 Changes

    API Changes

    • โž• Added Object.select and Object.reject to help filter keys in objects.
    • ๐Ÿ‘ String#startsWith and String#endsWith have changed to match the Harmony proposal better.
    • ๐Ÿ›  Fix for Date.create not preserving the UTC flag when the source is also a date (Issue #235).
    • ๐Ÿ‘ฏ Object.clone on arrays with the "deep" flag set to true should create a deep clone of the array (Issue #237).
    • Array#min/max should throw an error when comparing to undefined (Issue #232).
    • ๐Ÿ›  Fix for dates that fallback to native parsing when forcing UTC flag (Issue #244).
    • Date#since/fromNow aliases will now count "past" integers instead of rounding (Issue #236).
    • โž• Adding enumerable methods to Object.extend().
  • v1.3.6 Changes

    API Changes

    • Faster String#repeat (Issue #214 - Thanks to @termi!).
    • ๐Ÿ›  Fixed issue with Array#sample skewing randomization (Issue #216).
    • ๐Ÿ“œ Limiting minute/second parsing to 0-59 (Issue #219).
    • ๐Ÿ›  Fixed issue with addMonths (Issue #221).
    • ๐Ÿ›  Fixed issue with NaN being true for isOdd (Issue #220).
    • ๐Ÿ›  Fixed issue with HTML escaping (Issue #212).
    • ๐Ÿ›  Fixed issue with float values parsing in Object.fromQueryString (Issue #225).
    • ๐Ÿ”จ Internal refactoring of Object.each.
    • ๐Ÿ›  Fixed issue with 7 July date format (Issue #227).
    • โž• Added "'yy" as a valid year format.
    • ๐Ÿ‘ Allowing empty strings for thousands separator and decimal in Number#format (Issue #229).
  • v1.3.5 Changes

    API Changes

    • Now allowing "n days later" etc. as a parsable format (#199).
    • โž• Added support for "the nth" format (#205).
    • ๐Ÿ›  Fixed issue with Array.create on objects (#195).
    • ๐Ÿ›  Fixed am/pm issues with Date parsing (#201).
    • ๐Ÿ›  Fixed issues with Date.future (#210), zh-CN locale time parsing, (#204).
    • โž• Added support for Finnish locale (#185), Dutch, and Danish.
    • ๐Ÿ›  Fixed Number.random to have better random distribution (#196).
    • Issue with Date cloning (#200).
  • v1.3.4 Changes

    API Changes

    • ๐Ÿ”จ Refactored 3rd utc argument into a separate object for clarity.
  • v1.3.3 Changes

    Internal Changes

    • multiMatch does not treat functions as callbacks when matching against other functions.
  • v1.3.2 Changes

    API Changes

    • Date#create on ISO dates no longer sets the utc flag.
    • ๐Ÿ›  Fixed implementation of 'Function#bind', which was overriding native method due to an error in the MDN docs.