v1.3

API Changes

Sugar packages are now further split up and can easily be customized and repackaged. Aside from "core" there is the "es5" package that can be opted out of if <= IE8 support isn't an issue. DateRanges (below) are now their own package, as are inflections.

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 now treats negative indexes like String#slice

Fixed issue with decodeBase64 shim (Issue 145)

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

Internal Changes

References to Object.extend and Object.restore now held and allowed to be restored later.

v1.2

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 (ie. 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.

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

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

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.

v1.1.1

API Changes

Object.merge now accepts a third parameter that determines what to do in the case of property conflicts. This parameter can be true, false, or a function. This change means that it now no longer accepts an arbitrary number of arguments.

Added Object.isNaN

Added Object.tap

Consolidated the arguments that are passed to mapping functions on methods such as Array#min/max/groupBy/sortBy. All such functions will now be passed the array element, array index, and array object, in that order, to conform to ES5 Array#map behavior.

Array#flatten can now accept a level of nesting to flatten to. Default is all levels.

Array#remove no longer works like a reverse concat (ie. no longer flattens arguments passed to it as if they were passed as separate arguments, so removing arrays within arrays should now work properly. This applies to Array#exclude as well.

Added Array#zip

Internal Changes

Refactored way in which type/hash methods are mapped

Fixed Date bug "2 weeks from Monday"

v1.1

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