Commit Graph

11 Commits

Author SHA1 Message Date
Karson Miller 5e9333b699 no message 2016-02-18 15:30:44 -08:00
Scott Kyle 5332131c14 Add sorted() method to List 2016-02-18 13:41:11 -08:00
Scott Kyle d847fbceb1 Further improve argument checking for sorted() 2016-02-18 12:55:54 -08:00
Scott Kyle 05d84b23a2 Change sortedBy API as discussed
If provided an array, then each member can optionally be an array of [propName, reverse]
2016-02-18 12:47:18 -08:00
Scott Kyle 76865d0da4 Allow sortedBy to accept array of properties
It now optionally accepts an array of properties for both parameters and the tests have been updated to reflect new capabilities.
2016-02-18 11:58:39 -08:00
Scott Kyle 249bcd8f3f Change sortByProperty to return new Results
The method name changed to sortedBy to reflect that it returns a new Results object and to be more succinct. Also, the second optional argument instead reflects descending (or rather, reverse) since it's an anti-pattern to have an optional argument default to true in JS, and this also follows precedences set by other JS libraries and by Python's sorted function.
2016-02-18 11:58:39 -08:00
Ari Lazier b3486c0d0e final fixes 2016-02-17 20:51:03 -08:00
Ari Lazier d838d61de4 test query refinement 2016-02-17 20:09:39 -08:00
Ari Lazier e91ef42ebb add filtered method 2016-02-17 20:06:42 -08:00
Scott Kyle 9be1331dbf Convert tests to create objects with property objects
This makes it more readable and will be the preferred syntax in the documentation (and is much less likely to be deprecated in the future!).
2016-01-05 13:54:03 -08:00
Scott Kyle b3a0627a51 Rename JS test files to be consistent 2015-12-29 14:56:38 -08:00