Skip to content

Commit

Permalink
Merge branch 'string_compare'
Browse files Browse the repository at this point in the history
Former-commit-id: c23b0ef60daacc3bc728b84d43d110aac542be5f [formerly f8d5df05d50af9ea2ebd15b07892764a33f73fe0]
Former-commit-id: 449a3ba7341f59e4b8209e46fd91392ab44c9669
  • Loading branch information
andrewplummer committed Mar 7, 2012
2 parents a94cbdf + 4bc0c41 commit 72b85ea
Show file tree
Hide file tree
Showing 10 changed files with 649 additions and 201 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,8 +4,16 @@ v1.2.3

### 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 package.
- Bugfix for leaking globals.
- Bugfix for String#compact (Issue 115)

### Internal Changes ###

Expand Down
145 changes: 76 additions & 69 deletions UPDATE.md
Expand Up @@ -8,68 +8,84 @@ If your code breaks on update check here first!
Read all the ones that are greater than the version you are migrating from.


v0.9.1+


v1.2.3+
=======

- Level: Major
- Object.create changed to Object.extended.
- String#compare, Number#compare, and Date#compare are deprecated

- Level: Major
- Object.merge params are swapped. `resolve` is now the 4th parameter and `deep` is now 3rd.
When using extended objects, this are now 2nd and 3rd parameters. `deep` is now false by default.

- Level: Minor
- Array#sortBy now exhibits more sensible behavior when sorting on strings.


v0.9.3+

v1.2.2+
=======

- Level: Very Minor
- Extended objects now keep their "Hash" constructor (which is internal) so they no longer have `Object` as their constructor. If you are doing instanceof checks here this may break (which you shouldn't be doing anyway)

- Level: Major
- Array#each is no longer an alias of Array#forEach and now has its own behavior including a 2nd parameter for the start index, 3rd parameter for looping from the beginning, returning the array, allowing returning false to break the loop, passing the array as scope to the callback, and support for sparse arrays.

- Level: Major
- Array#eachFromIndex deprecated.

- Level: Major
- Array#removeAtIndex renamed to Array#removeAt.
v1.2+
=====

- Level: Major
- Array#collect deprecated.
- Array methods now use "fuzzy object matching" when passing an object. As an example, `arr.find({ foo: 'bar' })` would previously only match an identical object, now it will match any object whose `foo` property is `bar`. Additionally, note that passing regexes and functions will be used to match (regexes match against strings, functions are callbacks that return `true`/`false`), not compared directly. This applies to the following array methods: `every`, `some`, `filter`, `find`, `findAll`, `findIndex`, `remove`, `none`, `count`, and `exclude`.

- Level: Major
- Array#shuffle deprecated.
- Object.sugar renamed to Object.restore. However Object.sugar() equivalent is now Object.extend().

- Level: Major
- String#titleize deprecated. It is now available again as of v1.2 in the Inflections module, available at sugarjs.com/customize.
- Level: Minor
- Object.merge now also merges undefined properties.

- Level: Major
- String#pad/padLeft/padRight changed argument order to padding first and number second.

- Level: Moderate
- Array#indexOf/lastIndexOf now performs a simple `===` equality check instead of a deep recursive property check.

- Level: Minor
- String#repeat will now return a blank string on numbers less than 1.
v1.1.2+
=======

- Level: Minor
- String#dasherize and String#underscore now strip whitespace.
- Function#after will now call a method immediately if the passed value is `0`.

- Level: Very minor
- Object.isEmpty will now properly report `false` for primitive types like `null` and empty strings.


v0.9.5+
=======

v1.1.1+
=======

- Level: Major
- Array#split deprecated.
- Object.merge no longer merges an arbitrary number of arguments. Use extended objects and chaining instead.

- Level: Minor
- Array#remove and Array#exclude now no longer accept an arbitrary number of arguments. Pass only 1 argument to these methods (may be a nested array).

- Level: Major
- String#toObject is now Object.fromQueryString.


v1.1+
=====

- Level: Major
- Function.lazy is now Function#lazy and is called directly on function instances.
- Object.equals renamed to Object.equal.

- Level: Major
- Function#defer is now simply Function#delay with no arguments.
- Number#format "thousands" and "decimal" parameters are now pushed to the 2nd and 3rd parameters, adding a "place" for the decimal as the 1st.

- Level: Moderate
- Object.clone is now shallow by default.
- Level: Minor
- A few tokens were removed from Date#format. See sugarjs.com/dates for a list of currently accepted tokens.

- Level: Minor
- Function#lazy now executes, then waits as opposed to waiting, then executing.

- Level: Minor
- Array#sortBy is now no longer destructive, so you will need to set the variable explicitly.



Expand Down Expand Up @@ -100,76 +116,67 @@ v1.0+



v1.1+
=====
v0.9.5+
=======

- Level: Major
- Object.equals renamed to Object.equal.

- Level: Major
- Number#format "thousands" and "decimal" parameters are now pushed to the 2nd and 3rd parameters, adding a "place" for the decimal as the 1st.

- Level: Minor
- A few tokens were removed from Date#format. See sugarjs.com/dates for a list of currently accepted tokens.

- Level: Minor
- Function#lazy now executes, then waits as opposed to waiting, then executing.

- Level: Minor
- Array#sortBy is now no longer destructive, so you will need to set the variable explicitly.

- Array#split deprecated.

- Level: Major
- String#toObject is now Object.fromQueryString.

v1.1.1+
=======
- Level: Major
- Function.lazy is now Function#lazy and is called directly on function instances.

- Level: Major
- Object.merge no longer merges an arbitrary number of arguments. Use extended objects and chaining instead.
- Function#defer is now simply Function#delay with no arguments.

- Level: Minor
- Array#remove and Array#exclude now no longer accept an arbitrary number of arguments. Pass only 1 argument to these methods (may be a nested array).
- Level: Moderate
- Object.clone is now shallow by default.



v1.1.2+
v0.9.3+
=======

- Level: Minor
- Function#after will now call a method immediately if the passed value is `0`.

- Level: Very minor
- Object.isEmpty will now properly report `false` for primitive types like `null` and empty strings.


- Level: Major
- Array#each is no longer an alias of Array#forEach and now has its own behavior including a 2nd parameter for the start index, 3rd parameter for looping from the beginning, returning the array, allowing returning false to break the loop, passing the array as scope to the callback, and support for sparse arrays.

v1.2+
=====
- Level: Major
- Array#eachFromIndex deprecated.

- Level: Major
- Array methods now use "fuzzy object matching" when passing an object. As an example, `arr.find({ foo: 'bar' })` would previously only match an identical object, now it will match any object whose `foo` property is `bar`. Additionally, note that passing regexes and functions will be used to match (regexes match against strings, functions are callbacks that return `true`/`false`), not compared directly. This applies to the following array methods: `every`, `some`, `filter`, `find`, `findAll`, `findIndex`, `remove`, `none`, `count`, and `exclude`.
- Array#removeAtIndex renamed to Array#removeAt.

- Level: Major
- Object.sugar renamed to Object.restore. However Object.sugar() equivalent is now Object.extend().
- Array#collect deprecated.

- Level: Minor
- Object.merge now also merges undefined properties.
- Level: Major
- Array#shuffle deprecated.

- Level: Major
- String#titleize deprecated. It is now available again as of v1.2 in the Inflections module, available at sugarjs.com/customize.

- Level: Major
- String#pad/padLeft/padRight changed argument order to padding first and number second.

v1.2.2+
=======
- Level: Moderate
- Array#indexOf/lastIndexOf now performs a simple `===` equality check instead of a deep recursive property check.

- Level: Minor
- String#repeat will now return a blank string on numbers less than 1.

- Level: Very Minor
- Extended objects now keep their "Hash" constructor (which is internal) so they no longer have `Object` as their constructor. If you are doing instanceof checks here this may break (which you shouldn't be doing anyway)
- Level: Minor
- String#dasherize and String#underscore now strip whitespace.



v1.2.3+
v0.9.1+
=======

- Level: Major
- Object.merge params are swapped. `resolve` is now the 4th parameter and `deep` is now 3rd.
When using extended objects, this are now 2nd and 3rd parameters. `deep` is now false by default.
- Object.create changed to Object.extended.


0 comments on commit 72b85ea

Please sign in to comment.