Version 2.5.1

Rating: No reviews yet
Downloads: 99
Released: Oct 5, 2014
Updated: Oct 6, 2014 by Torac24
Dev status: Stable Help Icon

Recommended Download

Source Code Javascript Source Code File
source code, 90K, uploaded Oct 6, 2014 - 45 downloads

Other Available Downloads

Source Code Typescript Source Code File (Optional)
source code, 105K, uploaded Oct 6, 2014 - 22 downloads
Source Code Javascript Unit Test File (Optional)
source code, 62K, uploaded Oct 6, 2014 - 16 downloads
Source Code TypeScript Unit Test File (Optional)
source code, 65K, uploaded Oct 6, 2014 - 16 downloads

Release Notes

New Methods
  • Added "Concat". Combines 2 array's into 1 array. Does not remove duplicates
  • Added "ConcatQuery". Combines an array and an iterator query into 1 array. Does not remove duplicates. I had to use 2 methods (Concat vs ConcatQuery because I wasn't able to overload the methods). If anyone has any suggestions let me know.
  • Added "Union". Combines 2 array's into 1 array. Removes duplicates (does not handle object equality)
  • Added "UnionQuery". Combines and array and an iterator query into 1 array. Removes duplicates (does not handle object equality)
"Concat" is different than the native "concat" because it's lazy evaluated. Native concat is eager evaluated.

Bug Fix
  • Fixed Item 1101. Credit to yongjiwang for finding this. LastItem and AnyItems not found when you are adding it to a query. Unit test have been created to check for this going forward.
var hasItem = _Array.Where(function (x) { return x.id > 5; }).AnyItems();
var lastItem = _Array.Where(function (x) { return x.id > 5; }).LastItem();
  • Also fixed the documentation for "Avg". The method name should be "Average" not "Avg"
  • Make sure every method has atleast 2 unit tests that do the following. Run it off of array and run it off of an existing iterator / query

Code Cleanup Changes
  • In ResetIterator don't check for Expression.PreviousExpression. Grabbing an undefined value will work with the null check. So if statement is not needed.
  • ToDictionary will now take an iterator instead of a collection. This way we don't need to materialize an array just to be passed into BuildDictionary. This way we can loop one at a time when building the dictionary and we never have to materialize that array.
  • In Dictionary.Values cache the key's array length. This way we don't need to figure it out on each loop around.
  • Few variable name changes and variable spelling changes.
  • Add the CallbackIterator. Look in the source code for the callback iterator documentation. Currently not used in the source code, but it might be useful in the future if you need an iterator where you don't need to base it off of an array. This way the base collection is never materialized.

Reviews for this release

No reviews yet for this release.