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

Changelog History
Page 3

  • v1.3.1 Changes

    API Changes

    • Matching by value in arrays is now opt-in and must meet certain requirements, namely being of class [object Object], and having hasOwnProperty. This will notably now exclude functions and host objects such as DOM elements. This means that such excluded objects will be matched by reference only.
    • πŸ›  Fixed issue with Array.create not properly creating arrays #171
    • Empty objects now match themselves in arrays #176
    • Date#setWeekday now returns a timestamp for consistency with Date#setDay #181
    • πŸ—„ Date#toUTC deprecated in favor of Date#utc and utc flag in Date#create.
    • πŸ—„ Date#setUTC deprecated in favor of direct use of utc flag.
    • πŸ—„ Date#setUTCWeek deprecated in favor of direct use of utc flag.
    • πŸ—„ Date#getUTCWeek deprecated in favor of direct use of utc flag.
    • πŸ—„ Date#setUTCWeekday deprecated in favor of direct use of utc flag.
    • πŸ‘― Date#clone now clones the utc flag of the date.
    • πŸ›  Fixed issue with DateRange causing an infinite loop when DST traverses back 1 hour.
    • πŸ‘ Better date disambiguation for ambiguous dates ("Sunday", etc)
    • πŸ“œ Various date parsing fixes.
    • Timers set by delays are now exposed #170
    • Function#debounce debounced function is now canceled instead of original.
    • πŸ”¨ Internal refactoring of class check handling.
  • v1.3 Changes

    API Changes

    • πŸ“¦ Sugar modules are now further split up and can easily be customized and repackaged. Aside from "core" there is the "es5" module that can be opted out of if <= IE8 support isn't an issue. DateRanges (below) are now their own module, as are inflections.
    • Date locales are now a separate module, only English is included in the base "date" module.
    • Enumerable methods are now available as class methods on Object, and instance methods on extended objects. This includes: map, any, all, none, count, sum, average, find, findAll, min, max, least, most, and reduce.
    • βž• Added Object.size (also available to extended objects)
    • 0️⃣ Array#min, Array#max, Array#least, and Array#most now return a single element by default with the option to return multiple elements.
    • Object.equals now considers identical objects vs. extended objects to be the same
    • πŸ”¨ Refactored Object.isEmpty to be an enumerable method in the Array module. This means that it will error on non-objects now.
    • βž• Added "language" module.
    • 🚚 String#normalize moved from Inflections to Language module
    • 🚚 String#has[Script] moved from String to Language module
    • 🚚 String#hankaku and String#zenkaku moved from String to Language module
    • 🚚 String#hiragana and String#katakana moved from String to Language module
    • 🚚 String#namespace moved from Inflections to String module
    • String#parameterize now checks for normalize and also uses encodeURI for final output
    • 🚚 String#split patching for regexes is now removed from the String module and is on its own in /lib/extra. It can be dropped in anywhere after Sugar is loaded.

    • πŸ—„ Array#has is deprecated

    • Array#groupBy no longer returns extended objects

    • Array#groupBy no longer corrupts array length (Issue 142)

    • Enumerable methods now allow fuzzy matching of instances of classes (Issue 157)

    • All Math methods are now mapped onto Number and are accessible as instance methods

    • String#capitalize all will capitalize any letter after a letter that could not be capitalized.

    • String#insert, and Array#insert now treat negative indexes like String#slice

    • πŸ›  Fixed issue with decodeBase64 shim (Issue 145)

    • πŸ—„ String#toDate is now deprecated.

    • πŸ“œ Date parsing formats are now scoped by locale. This means that if the current locale is set to English, only English formats will be parsed when Date#create does not specify a locale, even if a different locale was initialized previously. Numeric and common formats are available in all locales.

    • βž• Added output formats Date#long and Date#full which now included the time. Date#long (mm dd, yyyy hh:mm) is now the default for Date#format, and the previous default (no time) is now Date#short. Date#full includes milliseconds and weekday.

    • πŸ‘ Date format "just now" now supported

    • πŸ‘ Date#reset now supports resetting a unit based on a string.

    • Date#advance and other advance methods can now reset the time.

    • Date#advance now accepts string input like "4 days" (Issue 161)

    • πŸ“œ Date.past and Date.future added which allow date parsing that prefers the past or future when the specified date is ambiguous ("Sunday", etc.)

    • πŸ“œ Date parsing now allows time to be in front of the date string as well

    • πŸ›  Fixed various issues with timezones, DST, and date parsing (Issue 146), (Issue 138)

    • βž• Added "in 3 days", etc. as a parsable format

    • βž• Added "the 2nd Tuesday of November", etc. as a parsable format

    • βž• Added more parsable formats with weekdays (such as "last monday", etc) in various locales

    • βž• Added time parsing in non-English date formats

    • Fully qualified ISO language codes will now match more generic codes. This means passing "it_IT" will correctly find "it" if the more specific locale is not available.

    • Unknown languages codes will now simply return an invalid date instead of throwing an error.

    • βž• Added support for full kanji numerals in date parsing

    • βž• Added support for time suffixes in Asian time strings (ζ™‚ etc)

    • βž• Added support for various relative formats in CKJ dates (ε…ˆι€±ζ°΄ζ›œζ—₯ etc)

    • πŸ›  Fixed inconsistently not allowing spaces before am/pm (Issue 144)

    • βž• Added DateRange, accessed through Date.range

  • v1.2.5 Changes

    API Changes

    • πŸ”¨ String#truncate refactored to split words by default (standard behavior) allow splitting in various positions, and changing argument order.
    • Object.isObject should be true for extended objects as well.
    • Function#throttle added to take the place of Function#debounce with false as the wait parameter.
    • πŸ“œ Date parsing support for hour/minute/second fractions (now take the place of milliseconds).
    • πŸ‘€ Date parsing support now sees commas in decimals.
    • πŸ“œ Date parsing support for .NET dates.
  • v1.2.4 Changes

    API Changes

    • 🐎 Major performance improvement for Array#unique, Array#union, Array#intersect (now On vs. OnΒ²)
    • Array#min, Array#max, Array#most, Array#least also benefit from this.
    • Object.equal(s) is now egal (this should only matter for edge cases) like Underscore.
    • πŸ”€ Object.merge will now work on non-objects as well.
    • Custom formats in Date.addFormat will now override built-in formats.
    • πŸ›  Fix for Array#union incorrectly flattening arrays.
    • πŸ›  Fix for isObject not working across iframes.
    • πŸ›  Fix for String#chars incorrectly trimming.
    • πŸ›  Fix for String#each not matching all characters.

    Internal Changes

    • multiArgs now flatten is opt-in
  • v1.2.3 Changes

    API Changes

    • πŸ—„ String#compare, Number#compare, and Date#compare are deprecated.
    • Array#sortBy now makes much more sensible sorting when sorting on strings.
    • βž• Added Array.AlphanumericSortOrder
    • βž• Added Array.AlphanumericSortIgnore
    • βž• Added Array.AlphanumericSortIgnoreCase
    • βž• Added Array.AlphanumericSortEquivalents
    • πŸ”€ Object.merge defaults are now more sensible. shallow/deep is 3rd with shallow default and resolve is 4th
    • βž• Added Number#duration to dates module.
    • πŸ›  Bugfix for leaking globals.
    • πŸ›  Bugfix for String#compact (Issue 115)

    Internal Changes

    • Cleanup for toISOString internal code.
  • v1.2.2 Changes

    API Changes

    • 🐎 Performance optimization for Object.merge and by extension Object.clone
    • Object.extended now maintains its "Hash" constructor and checks against it when cloning.
    • πŸ”€ Object.merge now will also clone dates and regexes as well.
    • πŸ›  Reset dates that will be set with UTC methods (fixes issue #98).

    Internal Changes

    • βœ‚ Removed references to isDefined, isNull, and isObjectPrimitive
  • v1.2.1 Changes

    API Changes

    • βž• Added Object.has to fix issue #97. Stand-in for Object#hasOwnProperty.
    • πŸ›  Fixed issue with String#has not escaping regex tokens.
    • 0️⃣ Date.setLocale can now overwrite a default locale object.
    • Date locales can now add their own formats.
    • πŸ›  Fix for Ender, which was broken when modularized in 1.2.
    • β†ͺ Workaround for Ender requiring externs.

    Internal Changes

    • Date optional tokens now start from {0}
    • βͺ References to Object.extend and Object.restore now held and allowed to be restored later.
  • v1.2 Changes

    API Changes

    • πŸ‘ Allowed external libraries to extend natives through a common interface "extend".
    • βͺ Renamed "sugar" to "restore" to restore Sugar methods on a given class.
    • Extending Object.prototype functionality is now on "extend" instead.
    • Split the date library into its own module that hooks into this new interface.
    • βž• Added a new module: String inflections
    • Object.keys now passes values as part of the callback like array methods.
    • πŸ”€ Object.merge now merges undefined properties as well.
    • Array#every now uses fuzzy object matching
    • Array#some now uses fuzzy object matching
    • Array#filter now uses fuzzy object matching
    • Array#find now uses fuzzy object matching
    • Array#findAll now uses fuzzy object matching
    • Array#findIndex now uses fuzzy object matching
    • 🚚 Array#remove now uses fuzzy object matching
    • Array#none now uses fuzzy object matching
    • Array#count now uses fuzzy object matching
    • Array#exclude now uses fuzzy object matching
    • πŸ“œ Array#clone is now no longer based off Array#concat, which will fail on sparse arrays in IE7.
    • βž• Added Number#abbr
    • βž• Added Number#metric
    • βž• Added Number#bytes
    • βž• Added Number#isInteger
    • πŸ›  Fixed issue with Number#ordinalize where 113 would be "113rd".
    • String#each will now pass the match into the callback
    • String#toDate will now check for Date.create before hooking into it.
    • String#underscore will now check for acronyms if Inflectors module is present.
    • String#camelize will now check for acronyms if Inflectors module is present.
    • RegExp.escape will now perform a [toString] operation on non-strings (i.e. numbers, etc).
    • Function#fill now uses internal Array#splice to fill in arguments.
    • βž• Added support for JSON date format Date(xxxxxxxxxx).
    • πŸ›  Fixed issues with Date#getWeek.
    • πŸ›  Fixed issues with traversing months before January.
    • String#titleize added to inflections module.

    Internal Changes

    • Reworked "multiMatch" to recursively traverse object structures.
    • πŸ”€ mergeObject now merges undefined properties as well
    • Created method arrayIntersect to handle both Array#intersect and Array#subtract
    • Array#intersect and Array#subtract will not allow fuzzy object matching
    • Array#indexOf and Array#lastIndexOf polyfills now work off arrayIndexOf
    • βž• Added internal support for other dates that use timestamps.
    • πŸ‘ Reworked adding of Date#toISOString and Date#toJSON support.
  • v1.1.3 Changes

    API Changes

    • πŸ›  Fixed issue with Object.isEmpty where strings with length > 0 will return true.

    Internal Changes

    • ⚑️ Updated Array#sortBy to use .compare method when available.
  • v1.1.2 Changes

    API Changes

    • βž• Added Array#findIndex.
    • βž• Added Array#sample.
    • βž• Added String#compare.
    • βž• Added Number#compare.
    • βž• Added Date#compare.
    • πŸ›  Fixed issue with floats not properly being recognized in the query string.
    • πŸ›  Fixed issue with Object.isEmpty on non-object types and null.
    • πŸ›  Fixed issue with arrayEach not allowing negative start indexes.
    • πŸ›  Fixed issue with Array#reduce not recognizing 0 as a starting value.
    • πŸ›  Fixed issue with Array#add not allowing negative indexes.
    • πŸ›  Fixed issue with Number.random not recognizing upper limit of 0.
    • πŸ›  Fixed issue with String#dasherize not working on single camel cased letters.
    • πŸ›  Fixed issue with String#assign not working on an empty string or other falsy value.
    • πŸ›  Fixed issues with French and German date months not being correct.
    • πŸ›  Fixed Function#after not calling the method immediately when num is 0.

    Internal Changes

    • πŸ”¨ Refactored Array#reduce and Array#reduceRight to use the same internal method.
    • πŸ”¨ Refactored String#camelize to be smaller.
    • πŸ”¨ Refactored checkMonthTraversal to be more robust in a variety of situations.