OLD | NEW |
| (Empty) |
1 v1.4.1 | |
2 ====== | |
3 | |
4 ### API Changes ### | |
5 | |
6 - Fix for Object.select/reject not performing value match. (Issue #362) | |
7 - Fix for Object.merge not properly merging when target object isn't an object (
Issue #365) | |
8 - Fix for development script not running properly in meteor (Issue #361) | |
9 | |
10 | |
11 v1.4.0 | |
12 ====== | |
13 | |
14 ### API Changes ### | |
15 | |
16 - Adding generalized ranges for Numbers and Strings in addition to Dates. | |
17 - Date ranges are now part of the Range package and are no longer dependent on t
he Date package. | |
18 - Adding `clamp` for ranges and an alias for Number. | |
19 - Adding `cap` for ranges and an alias for Number. | |
20 - Added `String#truncateOnWords`. Part of the `String#truncate` functionality is
now here. | |
21 - `Array.create` will understand ranges and can build an array from one. | |
22 - `DateRange#duration` is deprecated in favor of `Range#span`. | |
23 - Fix for relative times with "4 weeks" that are actually past the single month
threshold. | |
24 - `Number#upto` and `Number#downto` will now work on inverse ranges. | |
25 - `pad`, `padLeft`, and `padRight` now pad to the specified length, instead of s
imply adding to string. | |
26 - Fuzzy matching methods like `findAll` now directly match regexes against eleme
nts, regardless of whether or not they are strings. | |
27 - 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 `===`. | |
28 - `Object.clone` now only works on known object types and does not work on insta
nces of user-created classes. | |
29 - `String#assign` now can be passed an array as well as enumerated arguments. | |
30 - Fixed global variable leak #328 | |
31 - Optimization for `Array#removeAt` #324 | |
32 - Fix for `isThisWeek` being false when not en locale. | |
33 - Timezone formatting tokens changed to align with Moment.js better. | |
34 - Major performance optimization for date formatting and more. | |
35 - Added `Date#beginningOfISOWeek` and `Date#endOfISOWeek` | |
36 - Fix for `Array#create` not working on argument objects of zero-length (Issue #
299). | |
37 - Fix for `String#capitalize` capitalizing after apostrophes (Issue #325). | |
38 - Fix for extended objects `select` and `reject` returning plain objects. | |
39 - Fix for `Object.merge` not merging certain deep objects. | |
40 - Added Date.SugarNewDate to allow customization of internally created dates. | |
41 - Removed `multiMatch` in favor of a cached matcher system. | |
42 - Fix for environments where regexes are functions. | |
43 - Fix for `Function#cancel` not properly clearing all timers (Issue #346). | |
44 - Fix for lazy functions not being able to recursively call themselves. | |
45 - Added option `immediate` to `Function#lazy`, which is now false by default. | |
46 - Added `Function#every`. | |
47 - Exposed `Array.AlphanumericSort` to allow its use in native `Array#sort`. | |
48 - Added `Array.AlphanumericSortNatural` that is on by default and triggers a nat
ural sort. | |
49 - Fixed strings not being coerced into objects in < IE8. | |
50 - `Array.find` now aligns with ES6 spec. | |
51 - Fixed bug with array like objects iterated over with loop = true. | |
52 - Fixed `String#truncate` not returning primitives. | |
53 - `String#repeat` is now aligned more with spec. `String#pad` follows suit. | |
54 - Added `Array#findFrom` and `Array#findIndexFrom`. | |
55 - Removed `String#normalize`. | |
56 - Removed `Range#step` alias. | |
57 - Removed `deep` argument from `Object.fromQueryString` and replaced with option
al boolean casting. | |
58 | |
59 ### Performance Enhancements ### | |
60 | |
61 - Object.map: up to 682% faster | |
62 - Date#format: up to 21,400% faster | |
63 - Array#min/max/less/more up to 83% faster | |
64 - Enumerable methods like findAll/findIndex/map/any/count/sum/etc.: up to 11,270
% faster | |
65 - isString/isNumber/isBoolean: up to 77% faster | |
66 - isEqual returns up front when === (can be *much* faster). Many methods use thi
s internally as well. | |
67 - Math related functions (and internals that use them): up to 16% faster. | |
68 - getRegExpFlags is up to 1000% faster. | |
69 - Range#every up to 52% faster for dates, 1500% faster for numbers/strings. | |
70 - Array#at and String#at up to 242% faster for single index lookups. | |
71 - String#assign up to 30% faster. | |
72 | |
73 | |
74 v1.3.9 | |
75 ====== | |
76 | |
77 ### API Changes ### | |
78 | |
79 - Added `Object.toQueryString`. | |
80 - Fix for timezone offset -0330, etc (Issue #262). | |
81 - Fix for methods like `isToday` not working when using a non-English locale (Is
sue #264). | |
82 - Removed `Sugar#namespace` to fix conflict with jQuery (Issue #265). | |
83 | |
84 | |
85 v1.3.8 | |
86 ====== | |
87 | |
88 ### API Changes ### | |
89 | |
90 - Renamed `Date#getWeek` and `Date#setWeek` to `Date#getISOWeek` and `Date#setIS
OWeek`. | |
91 - Updating `Date#setWeek` (now `Date#setISOWeek`) to follow ISO-8601 standard. | |
92 - Allowing lazy and throttled functions to return a memoized result, allowing th
em to double as a caching mechanism. | |
93 - Performance improvement to return early using typeof for type checks. | |
94 - Performance improvement for loops. | |
95 - Fix for Array#sample sometimes returning undefined (Issue #252). | |
96 - Fix for French locales (Issue #249). | |
97 - Fix for conflict with Coffeescript (Issue #248). | |
98 - Fix for Object.clone not preserving date _utc flag (Issue #256). | |
99 | |
100 | |
101 v1.3.7 | |
102 ====== | |
103 | |
104 ### API Changes ### | |
105 | |
106 - Added Object.select and Object.reject to help filter keys in objects. | |
107 - String#startsWith and String#endsWith have changed to match the Harmony propos
al better. | |
108 - Fix for Date.create not preserving the UTC flag when the source is also a date
(Issue #235). | |
109 - Object.clone on arrays with the "deep" flag set to true should create a deep c
lone of the array (Issue #237). | |
110 - Array#min/max should throw an error when comparing to undefined (Issue #232). | |
111 - Fix for dates that fallback to native parsing when forcing UTC flag (Issue #24
4). | |
112 - Date#since/fromNow aliases will now count "past" integers instead of rounding
(Issue #236). | |
113 - Adding enumerable methods to `Object.extend()`. | |
114 | |
115 | |
116 v1.3.6 | |
117 ====== | |
118 | |
119 ### API Changes ### | |
120 | |
121 - Faster String#repeat (Issue #214 - Thanks to @termi!). | |
122 - Fixed issue with Array#sample skewing randomization (Issue #216). | |
123 - Limiting minute/second parsing to 0-59 (Issue #219). | |
124 - Fixed issue with `addMonths` (Issue #221). | |
125 - Fixed issue with NaN being true for `isOdd` (Issue #220). | |
126 - Fixed issue with HTML escaping (Issue #212). | |
127 - Fixed issue with float values parsing in `Object.fromQueryString` (Issue #225)
. | |
128 - Internal refactoring of `Object.each`. | |
129 - Fixed issue with `7 July` date format (Issue #227). | |
130 - Added "'yy" as a valid year format. | |
131 - Allowing empty strings for thousands separator and decimal in `Number#format`
(Issue #229). | |
132 | |
133 v1.3.5 | |
134 ====== | |
135 | |
136 ### API Changes ### | |
137 | |
138 - Now allowing "n days later" etc. as a parsable format (#199). | |
139 - Added support for "the nth" format (#205). | |
140 - Fixed issue with `Array.create` on objects (#195). | |
141 - Fixed am/pm issues with Date parsing (#201). | |
142 - Fixed issues with `Date.future` (#210), zh-CN locale time parsing, (#204). | |
143 - Added support for Finnish locale (#185), Dutch, and Danish. | |
144 - Fixed `Number.random` to have better random distribution (#196). | |
145 - Issue with Date cloning (#200). | |
146 | |
147 v1.3.4 | |
148 ====== | |
149 | |
150 ### API Changes ### | |
151 | |
152 - Refactored 3rd utc argument into a separate object for clarity. | |
153 | |
154 | |
155 v1.3.3 | |
156 ====== | |
157 | |
158 ### Internal Changes ### | |
159 | |
160 - multiMatch does not treat functions as callbacks when matching against other f
unctions. | |
161 | |
162 | |
163 v1.3.2 | |
164 ====== | |
165 | |
166 ### API Changes ### | |
167 | |
168 - `Date#create` on ISO dates no longer sets the utc flag. | |
169 - Fixed implementation of 'Function#bind', which was overriding native method du
e to an error in the MDN docs. | |
170 | |
171 | |
172 v1.3.1 | |
173 ====== | |
174 | |
175 | |
176 ### API Changes ### | |
177 | |
178 - 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 no
tably now exclude functions and host objects such as DOM elements. This means th
at such excluded objects will be matched by reference only. | |
179 - Fixed issue with Array.create not properly creating arrays #171 | |
180 - Empty objects now match themselves in arrays #176 | |
181 - Date#setWeekday now returns a timestamp for consistency with Date#setDay #181 | |
182 - Date#toUTC deprecated in favor of Date#utc and utc flag in Date#create. | |
183 - Date#setUTC deprecated in favor of direct use of utc flag. | |
184 - Date#setUTCWeek deprecated in favor of direct use of utc flag. | |
185 - Date#getUTCWeek deprecated in favor of direct use of utc flag. | |
186 - Date#setUTCWeekday deprecated in favor of direct use of utc flag. | |
187 - Date#clone now clones the utc flag of the date. | |
188 - Fixed issue with DateRange causing an infinite loop when DST traverses back 1
hour. | |
189 - Better date disambiguation for ambiguous dates ("Sunday", etc) | |
190 - Various date parsing fixes. | |
191 - Timers set by delays are now exposed #170 | |
192 - Function#debounce debounced function is now canceled instead of original. | |
193 - Internal refactoring of class check handling. | |
194 | |
195 | |
196 | |
197 v1.3 | |
198 ====== | |
199 | |
200 | |
201 ### API Changes ### | |
202 | |
203 - Sugar packages are now further split up and can easily be customized and repac
kaged. 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. | |
204 - Date locales are now a separate package, only English is included in the base
"date" package. | |
205 - Enumerable methods are now available as class methods on Object, and instance
methods on extended objects. This includes: map, any, all, none, count, sum, ave
rage, find, findAll, min, max, least, most, and reduce. | |
206 - Added Object.size (also available to extended objects) | |
207 - Array#min, Array#max, Array#least, and Array#most now return a single element
by default with the option to return multiple elements. | |
208 - Object.equals now considers identical objects vs. extended objects to be the s
ame | |
209 - Refactored Object.isEmpty to be an enumerable method in the Array package. Thi
s means that it will error on non-objects now. | |
210 - Added "language" package. | |
211 - String#normalize moved from Inflections to Language package | |
212 - String#has[Script] moved from String to Language package | |
213 - String#hankaku and String#zenkaku moved from String to Language package | |
214 - String#hiragana and String#katakana moved from String to Language package | |
215 - String#namespace moved from Inflections to String package | |
216 - String#parameterize now checks for normalize and also uses encodeURI for final
output | |
217 - String#split patching for regexes is now removed from the String package and i
s on its own in /lib/extra. It can be dropped in anywhere after Sugar is loaded. | |
218 | |
219 - Array#has is deprecated | |
220 - Array#groupBy no longer returns extended objects | |
221 - Array#groupBy no longer corrupts array length (Issue 142) | |
222 - Enumerable methods now allow fuzzy matching of instances of classes (Issue 157
) | |
223 | |
224 - All Math methods are now mapped onto Number and are accessible as instance met
hods | |
225 | |
226 - String#capitalize all will capitalize any letter after a letter that could not
be capitalized. | |
227 - String#insert, and Array#insert now treat negative indexes like String#slice | |
228 - Fixed issue with decodeBase64 shim (Issue 145) | |
229 | |
230 - String#toDate is now deprecated. | |
231 - 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 d
oes not specify a locale, even if a different locale was initialized previously.
Numeric and common formats are available in all locales. | |
232 - 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 d
efault (no time) is now Date#short. Date#full includes milliseconds and weekday. | |
233 - Date format "just now" now supported | |
234 - Date#reset now supports resetting a unit based on a string. | |
235 - Date#advance and other advance methods can now reset the time. | |
236 - Date#advance now accepts string input like "4 days" (Issue 161) | |
237 - Date.past and Date.future added which allow date parsing that prefers the past
or future when the specified date is ambiguous ("Sunday", etc.) | |
238 - Date parsing now allows time to be in front of the date string as well | |
239 - Fixed various issues with timezones, DST, and date parsing (Issue 146), (Issue
138) | |
240 - Added "in 3 days", etc. as a parsable format | |
241 - Added "the 2nd Tuesday of November", etc. as a parsable format | |
242 - Added more parsable formats with weekdays (such as "last monday", etc) in vari
ous locales | |
243 - Added time parsing in non-English date formats | |
244 - Fully qualified ISO language codes will now match more generic codes. This mea
ns passing "it_IT" will correctly find "it" if the more specific locale is not a
vailable. | |
245 - Unknown languages codes will now simply return an invalid date instead of thro
wing an error. | |
246 - Added support for full kanji numerals in date parsing | |
247 - Added support for time suffixes in Asian time strings (時 etc) | |
248 - Added support for various relative formats in CKJ dates (先週水曜日 etc) | |
249 - Fixed inconsistently not allowing spaces before am/pm (Issue 144) | |
250 | |
251 - Added DateRange, accessed through Date.range as a separate package | |
252 | |
253 | |
254 v1.2.5 | |
255 ====== | |
256 | |
257 | |
258 ### API Changes ### | |
259 | |
260 - String#truncate refactored to split words by default (standard behavior) allow
splitting in various positions, and changing argument order. | |
261 - Object.isObject should be true for extended objects as well. | |
262 - Function#throttle added to take the place of Function#debounce with `false` as
the `wait` parameter. | |
263 - Date parsing support for hour/minute/second fractions (now take the place of m
illiseconds). | |
264 - Date parsing support now sees commas in decimals. | |
265 - Date parsing support for .NET dates. | |
266 | |
267 | |
268 v1.2.4 | |
269 ====== | |
270 | |
271 | |
272 ### API Changes ### | |
273 | |
274 - Major performance improvement for Array#unique, Array#union, Array#intersect (
now On vs. On²) | |
275 - Array#min, Array#max, Array#most, Array#least also benefit from this. | |
276 - Object.equal(s) is now egal (this should only matter for edge cases) like Unde
rscore. | |
277 - Object.merge will now work on non-objects as well. | |
278 - Custom formats in Date.addFormat will now override built-in formats. | |
279 - Fix for Array#union incorrectly flattening arrays. | |
280 - Fix for isObject not working across iframes. | |
281 - Fix for String#chars incorrectly trimming. | |
282 - Fix for String#each not matching all characters. | |
283 | |
284 ### Internal Changes ### | |
285 | |
286 - multiArgs now flatten is opt-in | |
287 | |
288 v1.2.3 | |
289 ====== | |
290 | |
291 | |
292 ### API Changes ### | |
293 | |
294 - String#compare, Number#compare, and Date#compare are deprecated. | |
295 - Array#sortBy now makes much more sensible sorting when sorting on strings. | |
296 - Added Array.AlphanumericSortOrder | |
297 - Added Array.AlphanumericSortIgnore | |
298 - Added Array.AlphanumericSortIgnoreCase | |
299 - Added Array.AlphanumericSortEquivalents | |
300 - Object.merge defaults are now more sensible. shallow/deep is 3rd with shallow
default and resolve is 4th | |
301 - Added Number#duration to dates package. | |
302 - Bugfix for leaking globals. | |
303 - Bugfix for String#compact (Issue 115) | |
304 | |
305 ### Internal Changes ### | |
306 | |
307 - Cleanup for toISOString internal code. | |
308 | |
309 | |
310 | |
311 | |
312 v1.2.2 | |
313 ====== | |
314 | |
315 | |
316 ### API Changes ### | |
317 | |
318 - Performance optimization for Object.merge and by extension Object.clone | |
319 - Object.extended now maintains its "Hash" constructor and checks against it whe
n cloning. | |
320 - Object.merge now will also clone dates and regexes as well. | |
321 - Reset dates that will be set with UTC methods (fixes issue #98). | |
322 | |
323 ### Internal Changes ### | |
324 | |
325 | |
326 - Removed references to isDefined, isNull, and isObjectPrimitive | |
327 | |
328 | |
329 | |
330 | |
331 v1.2.1 | |
332 ====== | |
333 | |
334 | |
335 ### API Changes ### | |
336 | |
337 - Added Object.has to fix issue #97. Stand-in for Object#hasOwnProperty. | |
338 - Fixed issue with String#has not escaping regex tokens. | |
339 - Date.setLocale can now overwrite a default locale object. | |
340 - Date locales can now add their own formats. | |
341 - Fix for Ender, which was broken when modularized in 1.2. | |
342 - Workaround for Ender requiring externs. | |
343 | |
344 ### Internal Changes ### | |
345 | |
346 - Date optional tokens now start from {0} | |
347 - References to Object.extend and Object.restore now held and allowed to be rest
ored later. | |
348 | |
349 | |
350 v1.2 | |
351 ==== | |
352 | |
353 | |
354 ### API Changes ### | |
355 | |
356 - Allowed external libraries to extend natives through a common interface "exten
d". | |
357 - Renamed "sugar" to "restore" to restore Sugar methods on a given class. | |
358 - Extending Object.prototype functionality is now on "extend" instead. | |
359 - Split the date library into its own module that hooks into this new interface. | |
360 - Added a new module: String inflections | |
361 - Object.keys now passes values as part of the callback like array methods. | |
362 - Object.merge now merges undefined properties as well. | |
363 - Array#every now uses fuzzy object matching | |
364 - Array#some now uses fuzzy object matching | |
365 - Array#filter now uses fuzzy object matching | |
366 - Array#find now uses fuzzy object matching | |
367 - Array#findAll now uses fuzzy object matching | |
368 - Array#findIndex now uses fuzzy object matching | |
369 - Array#remove now uses fuzzy object matching | |
370 - Array#none now uses fuzzy object matching | |
371 - Array#count now uses fuzzy object matching | |
372 - Array#exclude now uses fuzzy object matching | |
373 - Array#clone is now no longer based off Array#concat, which will fail on sparse
arrays in IE7. | |
374 - Added Number#abbr | |
375 - Added Number#metric | |
376 - Added Number#bytes | |
377 - Added Number#isInteger | |
378 - Fixed issue with Number#ordinalize where 113 would be "113rd". | |
379 - String#each will now pass the match into the callback | |
380 - String#toDate will now check for Date.create before hooking into it. | |
381 - String#underscore will now check for acronyms if Inflectors module is present. | |
382 - String#camelize will now check for acronyms if Inflectors module is present. | |
383 - RegExp.escape will now perform a [toString] operation on non-strings (ie. numb
ers, etc). | |
384 - Function#fill now uses internal Array#splice to fill in arguments. | |
385 - Added support for JSON date format Date(xxxxxxxxxx). | |
386 - Fixed issues with Date#getWeek. | |
387 - Fixed issues with traversing months before January. | |
388 - String#titleize added to inflections module. | |
389 | |
390 | |
391 ### Internal Changes ### | |
392 | |
393 - Reworked "multiMatch" to recursively traverse object structures. | |
394 - mergeObject now merges undefined properties as well | |
395 - Created method arrayIntersect to handle both Array#intersect and Array#subtrac
t | |
396 - Array#intersect and Array#subtract will not allow fuzzy object matching | |
397 - Array#indexOf and Array#lastIndexOf polyfills now work off arrayIndexOf | |
398 - Added internal support for other dates that use timestamps. | |
399 - Reworked adding of Date#toISOString and Date#toJSON support. | |
400 | |
401 | |
402 | |
403 | |
404 v1.1.3 | |
405 ====== | |
406 | |
407 ### API Changes ### | |
408 | |
409 - Fixed issue with Object.isEmpty where strings with length > 0 will return true
. | |
410 | |
411 ### Internal Changes ### | |
412 | |
413 - Updated Array#sortBy to use .compare method when available. | |
414 | |
415 | |
416 v1.1.2 | |
417 ====== | |
418 | |
419 ### API Changes ### | |
420 | |
421 - Added Array#findIndex. | |
422 - Added Array#sample. | |
423 - Added String#compare. | |
424 - Added Number#compare. | |
425 - Added Date#compare. | |
426 - Fixed issue with floats not properly being recognized in the query string. | |
427 - Fixed issue with Object.isEmpty on non-object types and null. | |
428 - Fixed issue with arrayEach not allowing negative start indexes. | |
429 - Fixed issue with Array#reduce not recognizing 0 as a starting value. | |
430 - Fixed issue with Array#add not allowing negative indexes. | |
431 - Fixed issue with Number.random not recognizing upper limit of 0. | |
432 - Fixed issue with String#dasherize not working on single camel cased letters. | |
433 - Fixed issue with String#assign not working on an empty string or other falsy v
alue. | |
434 - Fixed issues with French and German date months not being correct. | |
435 - Fixed Function#after not calling the method immediately when num is 0. | |
436 | |
437 | |
438 ### Internal Changes ### | |
439 | |
440 - Refactored Array#reduce and Array#reduceRight to use the same internal method. | |
441 - Refactored String#camelize to be smaller. | |
442 - Refactored checkMonthTraversal to be more robust in a variety of situations. | |
443 | |
444 v1.1.1 | |
445 ====== | |
446 | |
447 ### API Changes ### | |
448 | |
449 - Object.merge now accepts a third parameter that determines what to do in the c
ase of property conflicts. This parameter can be true, false, or a function. Thi
s change means that it now no longer accepts an arbitrary number of arguments. | |
450 - Added Object.isNaN | |
451 - Added Object.tap | |
452 - Consolidated the arguments that are passed to mapping functions on methods suc
h as Array#min/max/groupBy/sortBy. All such functions will now be passed the arr
ay element, array index, and array object, in that order, to conform to ES5 Arra
y#map behavior. | |
453 - Array#flatten can now accept a level of nesting to flatten to. Default is all
levels. | |
454 - Array#remove no longer works like a reverse concat (ie. no longer flattens arg
uments passed to it as if they were passed as separate arguments, so removing ar
rays within arrays should now work properly. This applies to Array#exclude as we
ll. | |
455 - Added Array#zip | |
456 | |
457 ### Internal Changes ### | |
458 | |
459 - Refactored way in which type/hash methods are mapped | |
460 - Fixed Date bug "2 weeks from Monday" | |
461 | |
462 v1.1 | |
463 ==== | |
464 | |
465 ### API Changes ### | |
466 | |
467 - Array#unique can now unique on a function, giving a shortcut to uniquify deep
objects | |
468 - Object.equals renamed to Object.equal in its class method only | |
469 - Object.equal now much more robust, can handle cyclic references, etc | |
470 - Number#format now accepts a parameter <place> for the decimal. "thousands", an
d "decimal" are pushed to 2nd and 3rd params | |
471 - Date#format now accepts different format tokens. A few counterintuitive ones r
emoved, and others were added to match moment.js including fff, ddd, mmm, etc | |
472 - Function#lazy now executes immediately and locks instead of setting a delay | |
473 - Added RegExp#getFlags | |
474 - Added Function#fill, which allows arguments to be intelligently curried | |
475 - Fixed broken support for SpiderMonkey under CouchDB | |
476 - Fixed sortBy is unintentionally destructive | |
477 - Full Asian date number formats now accepted | |
478 - Array#map/min/max/most/least/groupBy/sortBy no longer errors on undefined, nul
l, etc | |
479 - Fixed a bug with locking on Number#format when passing digits | |
480 | |
481 ### Internal Changes ### | |
482 | |
483 - Optimized for Google closure compilers max compression level | |
484 - Minified script dropped about 5kb | |
485 - Intelligently determining if cloned objects are extended | |
486 - transformArgument now just accepts <map> not the arguments object | |
487 - refactored asian digits to be globally replaced | |
488 - Date#toJSON and Date#toISOString now properly fall back to native methods | |
489 - Significantly wrote asynchronous function tests to be more reliable | |
490 | |
491 | |
492 | |
493 v1.0 | |
494 ==== | |
495 | |
496 ### API Changes ### | |
497 | |
498 - Object.sugar() now will add all extended object (hash) methods to Object.proto
type, letting you opt-in this functionality | |
499 - Object.watch() will observe changes in an object property and fire a callback
if it has changed | |
500 - Array.create() quickly creates arrays, most notably from an arguments object | |
501 - Array#groupBy now allows a callback to iterate over each group | |
502 - String#normalize method deprecated, but still available in lib directory | |
503 - String#is/hasArmenian, is/hasBopomofo, is/hasEthiopic, and is/hasGeorgian depr
ecated | |
504 - String#is/hasLatin added | |
505 - String#toDate now accepts a locale parameter | |
506 - String#spacify added | |
507 - String#assign added | |
508 - Date module completely reworked to allow locales | |
509 - Date#format " short" token suffix deprecated | |
510 - Date#format " pad" token suffix deprecated | |
511 - Date#format "dir" parameter passed to the callback deprecated in favor of usin
g the sign directly on the time itself | |
512 - Date#format locale now passed to the callback instead of the above | |
513 - Date#format passing no arguments now outputs a default simple date format for
the current locale | |
514 - Date#relative same treatment as Date#format for callbacks as above | |
515 - Date.allowVariant for ambiguous dates (8/10/03) refactored to use locales inst
ead | |
516 - Date.RFC1123 and Date.RFC1036 fix to not display GMT | |
517 - Date.setLocale will set an available locale or allow extending the Date class
with new locales | |
518 - Date.getLocale gets a localization object (current localization by default) | |
519 - Date.addFormat allows additional date formats to be added | |
520 - Date#set passing true for the second param will now reset any units less speci
fic, not just the time | |
521 - Date#isBefore/isAfter/isBetween now uses a straight comparison rather than try
ing to extend the bounds of the date based on specificity | |
522 - Date#format now accepts a second locale parameter that outputs the date in a s
pecific locale. If no locale is set the current locale is used. | |
523 - Date#format passing "relative" as the format is now deprecated. Use Date#relat
ive instead | |
524 - Function#lazy now accepts a "limit" parameter that will prevent a lazy functio
n from queueing calls beyond a certain limit | |
525 - Function#debounce now accepts a "wait" parameter (default is true) that will a
llow function execution AFTER the timeout to be turned off so the function is ru
n immediately | |
526 | |
527 | |
528 | |
529 | |
530 ### Internal Changes ### | |
531 | |
532 - major docs updates | |
533 - arrayEach will now default to not loop over sparse arrays unless explicitly to
ld to | |
534 - major internal refactoring of the Date module to be more compact, robust, and
light | |
535 - date module will be distilled and contained on its own in the repo | |
536 | |
537 | |
538 v0.9.5 | |
539 ====== | |
540 | |
541 ### API Changes ### | |
542 | |
543 - .sugar method added to all classes to reinstate Sugar methods conditionally. | |
544 - Object.clone is now shallow by default, with an option for deep cloning | |
545 - Object.merge will now ignore non-objects | |
546 - Object.fromQueryString now takes the place of String#toObject. | |
547 - Nested object/array param parsing now possible with Object.fromQueryString. | |
548 - Array#remove now accepts unlimited parameters | |
549 - Array#exclude now accepts unlimited parameters | |
550 - Array#union now accepts unlimited parameters | |
551 - Array#subtract now accepts unlimited parameters | |
552 - Array#intersect now accepts unlimited parameters | |
553 - Array#split deprecated | |
554 - Array#compact no longer removes functions (bug) | |
555 - Array#compact now accepts flag to compact all falsy values | |
556 - Number#upto and Number#downto now accept a third parameter to traverse in mult
iples of > 1 | |
557 - Number#pad now accepts a third parameter that is the base of the number | |
558 - Number#hex now accepts a parameter to pad the resulting string with a default
of 1 | |
559 - String#escapeHTML added | |
560 - String#truncate added. Will truncate a string without breaking words. | |
561 - String#toObject now refactored to Object.fromQueryString | |
562 - Function.lazy refactored to Function#lazy | |
563 - Function#lazy functions can now be cancelled via Function#cancel | |
564 - Function#defer deprecated -> use Function#delay instead | |
565 - Function#debounce added | |
566 - Function#after added | |
567 - Function#once added | |
568 | |
569 | |
570 ### Internal Changes ### | |
571 | |
572 - extendWithNativeCondition removed. Functionality now contained in extend | |
573 - shuffled and removed some dependencies to make it easier to extract the date m
odule | |
574 - more robust equality comparison: | |
575 - multiArgs added to collect arguments | |
576 - array indexes now checked with hasProperty instead of hasOwnProperty | |
577 - object builders are now going through extend so they can store their reference
s | |
578 - Object.clone refactored to use multiArgs | |
579 - Object.isEmpty now returns false if passed argument itself is falsy | |
580 - String#stripTags refactored to use multiArgs | |
581 - String#removeTags refactored to use multiArgs | |
582 -- "null" now taken into consideration for objects | |
583 -- object key length compared | |
584 -- strict equality matches in multiMatch | |
585 | |
586 | |
587 v0.9.4 | |
588 ====== | |
589 | |
590 - Emergency fix for Array#compact incorrectly detecting NaN. | |
591 | |
592 v0.9.3 | |
593 ====== | |
594 | |
595 ### API Changes ### | |
596 | |
597 - Array.isArray polyfill added and aliased by Object.isArray (es5) | |
598 - Array#every/some/map/filter now throws a TypeError if no arguments passed (es5
) | |
599 - Array#every/some/map/filter now defers to native if available and no arguments
passed (es5) | |
600 - Array#none/any/all/has aliases similarly throw TypeErrors if no arguments pass
ed (es5) | |
601 - Array#indexOf/lastIndexOf now performs a simple strict equality check. Added t
o v0.9.2 but separately here (es5) | |
602 - Array#indexOf/lastIndexOf refactored to defer to String#indexOf/lastIndexOf if
a string is passed as the scope (es5) | |
603 - Array#forEach/reduce/reduceRight now all throw a TypeError if callback is not
callable (es5) | |
604 - Array#reduce/reduceRight now throw a TypeError if the array is empty and no in
itial value passed (es5) | |
605 - Array#each is now no longer an alias of forEach and has different behavior: | |
606 - second parameter is the index to start from | |
607 - third parameter is a boolean that runs the loop from the beginning if true | |
608 - returns the array | |
609 - fn returning false will break out of the loop | |
610 - will throw a TypeError if fn is not callable (same as forEach) | |
611 - array is now passed as the scope | |
612 - now detects sparse arrays and switches to a different algorithm to handle the
m | |
613 - Array#find refactored to use an internal method insted of Array#findAll to avo
id collisions | |
614 - Array#find now breaks as soon as it finds an element | |
615 - Array#eachFromIndex removed | |
616 - Array#removeAtIndex renamed to Array#removeAt | |
617 - Array#unique refactored to use an internal method instead of Array#find to avo
id collisions | |
618 - Array#subtract/intersect refactored to use an internal method instead of Array
#find to avoid collisions | |
619 - Array#subtract/intersect refactored to use Array.isArray instead of Object.isA
rray | |
620 - Array#union refactored to use an internal method instead of Array#unique to av
oid collisions | |
621 - Array#min/max refactored to use an internal method instead of Array#unique to
avoid collisions | |
622 - Array#least/most will now throw a TypeError if the first argument exists, but
is not a string or function | |
623 - Array#least/most refactored to use an internal method instead of Array#unique
to avoid collisions | |
624 - Array#groupBy will now throw a TypeError if the first argument exists, but is
not a string or function | |
625 - Array#sortBy will now throw a TypeError if the first argument exists, but is n
ot a string or function | |
626 - Array#compact/flatten now internally uses Array.isArray instead of Object.isAr
ray | |
627 - Array#collect alias removed | |
628 - Array#shuffle alias removed | |
629 - String#hankaku/zenkaku/hiragana/katakana refactored to shift char codes instea
d of using a hash table | |
630 - String#hankaku/zenkaku refactored to be much more accurate & strictly defined | |
631 - String#shift added | |
632 - String#trim refactored to handle all characters covered in es5/unicode (es5) | |
633 - String#trim refactored to check for support and polyfill as needed (es5) | |
634 - String#titleize removed | |
635 - String#capitalize refactored to allow capitalization of all letters | |
636 - String#pad/padLeft/padRight refactored to accept the number as the second para
m and padding as the first | |
637 - String#repeat refactored to return a blank string on num < 1 | |
638 - String#add refactored to act in parallel with Array#add | |
639 - String#remove added as a reciprocal of String#add and a parallel of Array#remo
ve | |
640 - String#dasherize/underscore refactored to strip whitespace | |
641 - Object.keys refactored to defer to native if < 2 arguments instead of == 1 | |
642 - Object.keys will now throw a TypeError if non-object passed (es5) | |
643 - Number.random fixed which had implied globals min & max | |
644 - Date.now polyfill added (es5) | |
645 - Date#toISOString refactored polyfill to check for native browser support (es5) | |
646 - Date#toJSON added as a polyfill alias to Date#toISOString with similar native
checks (es5) | |
647 - Date#format/relative refactored to point to an internal method to avoid collis
ions | |
648 - fixed date methods in ambiguous situations such as "5 months ago" when the tar
get month does not have enough days | |
649 - Function#bind refactored to check for native support and behave much more clos
ely to spec (es5) | |
650 - added documentation for unicode block methods | |
651 - added devanagari and ethiopic scripts | |
652 | |
653 | |
654 ### Internal Changes ### | |
655 | |
656 - refactored unicode script methods to use .test instead of .match | |
657 - extendWithNativeCondition refactored to allow a "supported" flag | |
658 - getMinOrMax refactored to use iterateOverObject | |
659 - getFromIndexes renamed to getAtIndexes | |
660 - toIntegerWithDefault added | |
661 - arrayFind added | |
662 - arrayEach added | |
663 - arrayUnique added | |
664 - isArrayIndex added (es5) | |
665 - toUint32 added (es5) | |
666 - checkCallback added (es5) | |
667 - checkFirstArgumentExists added (es5) | |
668 - buildObject refactored to be less invasive | |
669 | |
670 | |
671 | |
672 v0.9.2 | |
673 ====== | |
674 | |
675 - Emergency fix to alleviate issues with indexOf/lastIndexOf breaking on functio
ns/deep objects | |
676 | |
677 | |
678 | |
679 v0.9.1 | |
680 ====== | |
681 | |
682 - Change Object.create to Object.extended to avoid collision with ES5 | |
683 - Use of defineProperty in modern browsers to prevent enumeration in for..in loo
ps. | |
684 - Add test for for..in loop breakage and allowed older browsers to have a "warni
ng" message. | |
685 - Object.isArray will now alias native Array.isArray if it is present. | |
686 - Fix collisions with Prototype on Object.clone. | |
687 - Test cleanup. | |
688 | |
OLD | NEW |