All Versions
38
Latest Version
Avg Release Cycle
236 days
Latest Release
1754 days ago
Changelog History
Page 2
Changelog History
Page 2
-
v1.4.1 Changes
September 14, 2015API 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 theString#truncate
functionality is now here. - ๐
Array.create
will understand ranges and can build an array from one. - ๐
DateRange#duration
is deprecated in favor ofRange#span
. - ๐ Fix for relative times with "4 weeks" that are actually past the single month threshold.
Number#upto
andNumber#downto
will now work on inverse ranges.pad
,padLeft
, andpadRight
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
andDate#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
andreject
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
toFunction#lazy
, which is now false by default. - โ Added
Function#every
. - ๐ฆ Exposed
Array.AlphanumericSort
to allow its use in nativeArray#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
andArray#findIndexFrom
. - โ Removed
Range#step
alias. - โ Removed
deep
argument fromObject.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).
- โ Added
-
v1.3.8 Changes
API Changes
- ๐ Renamed
Date#getWeek
andDate#setWeek
toDate#getISOWeek
andDate#setISOWeek
. - โก๏ธ Updating
Date#setWeek
(nowDate#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).
- ๐ Renamed
-
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.