diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index fcba14c..0c68a7f 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -1,3 +1,3 @@ var typedoc = typedoc || {}; typedoc.search = typedoc.search || {}; - typedoc.search.data = {"kinds":{"32":"Variable","128":"Class","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"MapFn","url":"globals.html#mapfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":1,"kind":65536,"name":"__type","url":"globals.html#mapfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"MapFn"},{"id":2,"kind":4194304,"name":"AggFn","url":"globals.html#aggfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":3,"kind":65536,"name":"__type","url":"globals.html#aggfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"AggFn"},{"id":4,"kind":4194304,"name":"BoolPredicate","url":"globals.html#boolpredicate","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":5,"kind":65536,"name":"__type","url":"globals.html#boolpredicate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"BoolPredicate"},{"id":6,"kind":4194304,"name":"ComparerFn","url":"globals.html#comparerfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":7,"kind":65536,"name":"__type","url":"globals.html#comparerfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"ComparerFn"},{"id":8,"kind":4194304,"name":"CallbackFn","url":"globals.html#callbackfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":9,"kind":65536,"name":"__type","url":"globals.html#callbackfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"CallbackFn"},{"id":10,"kind":4194304,"name":"StrFn","url":"globals.html#strfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":11,"kind":65536,"name":"__type","url":"globals.html#strfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"StrFn"},{"id":12,"kind":128,"name":"Lazy","url":"classes/lazy.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":13,"kind":2048,"name":"empty","url":"classes/lazy.html#empty","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Lazy"},{"id":14,"kind":2048,"name":"from","url":"classes/lazy.html#from","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Lazy"},{"id":15,"kind":2048,"name":"range","url":"classes/lazy.html#range","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"Lazy"},{"id":16,"kind":2048,"name":"repeat","url":"classes/lazy.html#repeat","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Lazy"},{"id":17,"kind":2048,"name":"aggregate","url":"classes/lazy.html#aggregate","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":18,"kind":2048,"name":"all","url":"classes/lazy.html#all","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":19,"kind":2048,"name":"any","url":"classes/lazy.html#any","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":20,"kind":2048,"name":"average","url":"classes/lazy.html#average","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":21,"kind":2048,"name":"contains","url":"classes/lazy.html#contains","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":22,"kind":2048,"name":"count","url":"classes/lazy.html#count","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":23,"kind":2048,"name":"elementAt","url":"classes/lazy.html#elementat","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":24,"kind":2048,"name":"elementAtOrDefault","url":"classes/lazy.html#elementatordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":25,"kind":2048,"name":"first","url":"classes/lazy.html#first","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":26,"kind":2048,"name":"firstOrDefault","url":"classes/lazy.html#firstordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":27,"kind":2048,"name":"forEach","url":"classes/lazy.html#foreach","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":28,"kind":2048,"name":"iterableEquals","url":"classes/lazy.html#iterableequals","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":29,"kind":2048,"name":"last","url":"classes/lazy.html#last","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":30,"kind":2048,"name":"lastOrDefault","url":"classes/lazy.html#lastordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":31,"kind":2048,"name":"max","url":"classes/lazy.html#max","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":32,"kind":2048,"name":"min","url":"classes/lazy.html#min","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":33,"kind":2048,"name":"resolveAll","url":"classes/lazy.html#resolveall","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":34,"kind":2048,"name":"single","url":"classes/lazy.html#single","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":35,"kind":2048,"name":"singleOrDefault","url":"classes/lazy.html#singleordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":36,"kind":2048,"name":"stringJoin","url":"classes/lazy.html#stringjoin","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":37,"kind":2048,"name":"sum","url":"classes/lazy.html#sum","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":38,"kind":2048,"name":"toArray","url":"classes/lazy.html#toarray","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":39,"kind":2048,"name":"toJSON","url":"classes/lazy.html#tojson","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":40,"kind":2048,"name":"toMap","url":"classes/lazy.html#tomap","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":41,"kind":2048,"name":"append","url":"classes/lazy.html#append","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":42,"kind":2048,"name":"apply","url":"classes/lazy.html#apply","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":43,"kind":2048,"name":"concat","url":"classes/lazy.html#concat","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":44,"kind":2048,"name":"defaultIfEmpty","url":"classes/lazy.html#defaultifempty","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":45,"kind":2048,"name":"distinct","url":"classes/lazy.html#distinct","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":46,"kind":2048,"name":"except","url":"classes/lazy.html#except","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":47,"kind":2048,"name":"intersect","url":"classes/lazy.html#intersect","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":48,"kind":2048,"name":"join","url":"classes/lazy.html#join","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":49,"kind":2048,"name":"orderBy","url":"classes/lazy.html#orderby","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":50,"kind":2048,"name":"orderByDecending","url":"classes/lazy.html#orderbydecending","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":51,"kind":2048,"name":"prepend","url":"classes/lazy.html#prepend","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":52,"kind":2048,"name":"reverse","url":"classes/lazy.html#reverse","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":53,"kind":2048,"name":"select","url":"classes/lazy.html#select","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":54,"kind":2048,"name":"selectMany","url":"classes/lazy.html#selectmany","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":55,"kind":2048,"name":"skip","url":"classes/lazy.html#skip","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":56,"kind":2048,"name":"skipLast","url":"classes/lazy.html#skiplast","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":57,"kind":2048,"name":"skipWhile","url":"classes/lazy.html#skipwhile","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":58,"kind":2048,"name":"take","url":"classes/lazy.html#take","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":59,"kind":2048,"name":"takeLast","url":"classes/lazy.html#takelast","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":60,"kind":2048,"name":"takeWhile","url":"classes/lazy.html#takewhile","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":61,"kind":2048,"name":"union","url":"classes/lazy.html#union","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":62,"kind":2048,"name":"where","url":"classes/lazy.html#where","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":63,"kind":2048,"name":"zip","url":"classes/lazy.html#zip","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":64,"kind":2048,"name":"__@iterator","url":"classes/lazy.html#___iterator","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":65,"kind":4194304,"name":"IndexMapFn","url":"globals.html#indexmapfn","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":66,"kind":65536,"name":"__type","url":"globals.html#indexmapfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"IndexMapFn"},{"id":67,"kind":4194304,"name":"CombineFn","url":"globals.html#combinefn","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":68,"kind":65536,"name":"__type","url":"globals.html#combinefn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"CombineFn"},{"id":69,"kind":4194304,"name":"SortFn","url":"globals.html#sortfn","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":70,"kind":65536,"name":"__type","url":"globals.html#sortfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"SortFn"},{"id":71,"kind":4194304,"name":"IndexPredicate","url":"globals.html#indexpredicate","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":72,"kind":65536,"name":"__type","url":"globals.html#indexpredicate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"IndexPredicate"},{"id":73,"kind":4194304,"name":"IndexIsPredicate","url":"globals.html#indexispredicate","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":74,"kind":65536,"name":"__type","url":"globals.html#indexispredicate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"IndexIsPredicate"},{"id":75,"kind":32,"name":"empty","url":"globals.html#empty","classes":"tsd-kind-variable"},{"id":76,"kind":32,"name":"from","url":"globals.html#from","classes":"tsd-kind-variable"},{"id":77,"kind":32,"name":"range","url":"globals.html#range","classes":"tsd-kind-variable"},{"id":78,"kind":32,"name":"repeat","url":"globals.html#repeat","classes":"tsd-kind-variable"}]}; \ No newline at end of file + typedoc.search.data = {"kinds":{"32":"Variable","128":"Class","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"MapFn","url":"globals.html#mapfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":1,"kind":65536,"name":"__type","url":"globals.html#mapfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"MapFn"},{"id":2,"kind":4194304,"name":"AggFn","url":"globals.html#aggfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":3,"kind":65536,"name":"__type","url":"globals.html#aggfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"AggFn"},{"id":4,"kind":4194304,"name":"BoolPredicate","url":"globals.html#boolpredicate","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":5,"kind":65536,"name":"__type","url":"globals.html#boolpredicate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"BoolPredicate"},{"id":6,"kind":4194304,"name":"ComparerFn","url":"globals.html#comparerfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":7,"kind":65536,"name":"__type","url":"globals.html#comparerfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"ComparerFn"},{"id":8,"kind":4194304,"name":"CallbackFn","url":"globals.html#callbackfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":9,"kind":65536,"name":"__type","url":"globals.html#callbackfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"CallbackFn"},{"id":10,"kind":4194304,"name":"StrFn","url":"globals.html#strfn","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":11,"kind":65536,"name":"__type","url":"globals.html#strfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"StrFn"},{"id":12,"kind":128,"name":"Lazy","url":"classes/lazy.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":13,"kind":2048,"name":"empty","url":"classes/lazy.html#empty","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Lazy"},{"id":14,"kind":2048,"name":"from","url":"classes/lazy.html#from","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Lazy"},{"id":15,"kind":2048,"name":"range","url":"classes/lazy.html#range","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"Lazy"},{"id":16,"kind":2048,"name":"repeat","url":"classes/lazy.html#repeat","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Lazy"},{"id":17,"kind":2048,"name":"aggregate","url":"classes/lazy.html#aggregate","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":18,"kind":2048,"name":"all","url":"classes/lazy.html#all","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":19,"kind":2048,"name":"any","url":"classes/lazy.html#any","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":20,"kind":2048,"name":"average","url":"classes/lazy.html#average","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":21,"kind":2048,"name":"contains","url":"classes/lazy.html#contains","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":22,"kind":2048,"name":"count","url":"classes/lazy.html#count","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":23,"kind":2048,"name":"elementAt","url":"classes/lazy.html#elementat","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":24,"kind":2048,"name":"elementAtOrDefault","url":"classes/lazy.html#elementatordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":25,"kind":2048,"name":"first","url":"classes/lazy.html#first","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":26,"kind":2048,"name":"firstOrDefault","url":"classes/lazy.html#firstordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":27,"kind":2048,"name":"forEach","url":"classes/lazy.html#foreach","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":28,"kind":2048,"name":"iterableEquals","url":"classes/lazy.html#iterableequals","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":29,"kind":2048,"name":"last","url":"classes/lazy.html#last","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":30,"kind":2048,"name":"lastOrDefault","url":"classes/lazy.html#lastordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":31,"kind":2048,"name":"max","url":"classes/lazy.html#max","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":32,"kind":2048,"name":"min","url":"classes/lazy.html#min","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":33,"kind":2048,"name":"resolveAll","url":"classes/lazy.html#resolveall","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":34,"kind":2048,"name":"single","url":"classes/lazy.html#single","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":35,"kind":2048,"name":"singleOrDefault","url":"classes/lazy.html#singleordefault","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":36,"kind":2048,"name":"stringJoin","url":"classes/lazy.html#stringjoin","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":37,"kind":2048,"name":"sum","url":"classes/lazy.html#sum","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":38,"kind":2048,"name":"toArray","url":"classes/lazy.html#toarray","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":39,"kind":2048,"name":"toJSON","url":"classes/lazy.html#tojson","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":40,"kind":2048,"name":"toMap","url":"classes/lazy.html#tomap","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":41,"kind":2048,"name":"append","url":"classes/lazy.html#append","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":42,"kind":2048,"name":"apply","url":"classes/lazy.html#apply","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":43,"kind":2048,"name":"concat","url":"classes/lazy.html#concat","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":44,"kind":2048,"name":"defaultIfEmpty","url":"classes/lazy.html#defaultifempty","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":45,"kind":2048,"name":"distinct","url":"classes/lazy.html#distinct","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":46,"kind":2048,"name":"except","url":"classes/lazy.html#except","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":47,"kind":2048,"name":"groupJoin","url":"classes/lazy.html#groupjoin","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":48,"kind":2048,"name":"intersect","url":"classes/lazy.html#intersect","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":49,"kind":2048,"name":"join","url":"classes/lazy.html#join","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":50,"kind":2048,"name":"orderBy","url":"classes/lazy.html#orderby","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":51,"kind":2048,"name":"orderByDecending","url":"classes/lazy.html#orderbydecending","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":52,"kind":2048,"name":"prepend","url":"classes/lazy.html#prepend","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":53,"kind":2048,"name":"reverse","url":"classes/lazy.html#reverse","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":54,"kind":2048,"name":"select","url":"classes/lazy.html#select","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":55,"kind":2048,"name":"selectMany","url":"classes/lazy.html#selectmany","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":56,"kind":2048,"name":"skip","url":"classes/lazy.html#skip","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":57,"kind":2048,"name":"skipLast","url":"classes/lazy.html#skiplast","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":58,"kind":2048,"name":"skipWhile","url":"classes/lazy.html#skipwhile","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":59,"kind":2048,"name":"take","url":"classes/lazy.html#take","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":60,"kind":2048,"name":"takeLast","url":"classes/lazy.html#takelast","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":61,"kind":2048,"name":"takeWhile","url":"classes/lazy.html#takewhile","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":62,"kind":2048,"name":"union","url":"classes/lazy.html#union","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":63,"kind":2048,"name":"where","url":"classes/lazy.html#where","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":64,"kind":2048,"name":"zip","url":"classes/lazy.html#zip","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"Lazy"},{"id":65,"kind":2048,"name":"__@iterator","url":"classes/lazy.html#___iterator","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Lazy"},{"id":66,"kind":4194304,"name":"IndexMapFn","url":"globals.html#indexmapfn","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":67,"kind":65536,"name":"__type","url":"globals.html#indexmapfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"IndexMapFn"},{"id":68,"kind":4194304,"name":"CombineFn","url":"globals.html#combinefn","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":69,"kind":65536,"name":"__type","url":"globals.html#combinefn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"CombineFn"},{"id":70,"kind":4194304,"name":"SortFn","url":"globals.html#sortfn","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":71,"kind":65536,"name":"__type","url":"globals.html#sortfn.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"SortFn"},{"id":72,"kind":4194304,"name":"IndexPredicate","url":"globals.html#indexpredicate","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":73,"kind":65536,"name":"__type","url":"globals.html#indexpredicate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"IndexPredicate"},{"id":74,"kind":4194304,"name":"IndexIsPredicate","url":"globals.html#indexispredicate","classes":"tsd-kind-type-alias tsd-has-type-parameter tsd-is-not-exported"},{"id":75,"kind":65536,"name":"__type","url":"globals.html#indexispredicate.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"IndexIsPredicate"},{"id":76,"kind":32,"name":"empty","url":"globals.html#empty","classes":"tsd-kind-variable"},{"id":77,"kind":32,"name":"from","url":"globals.html#from","classes":"tsd-kind-variable"},{"id":78,"kind":32,"name":"range","url":"globals.html#range","classes":"tsd-kind-variable"},{"id":79,"kind":32,"name":"repeat","url":"globals.html#repeat","classes":"tsd-kind-variable"}]}; \ No newline at end of file diff --git a/docs/classes/lazy.html b/docs/classes/lazy.html index 8a4aca0..a6ac82d 100644 --- a/docs/classes/lazy.html +++ b/docs/classes/lazy.html @@ -121,6 +121,7 @@

Methods

  • first
  • firstOrDefault
  • forEach
  • +
  • groupJoin
  • intersect
  • iterableEquals
  • join
  • @@ -172,7 +173,7 @@

    Abstract __@iterator

  • Returns Iterator<TElement>

    @@ -1071,6 +1072,77 @@

    Returns void +
    + +

    groupJoin

    +
      +
    • groupJoin<TSecond, TKey, TResult>(second: Iterable<TSecond>, firstKeyFn: MapFn<TElement, TKey>, secondKeyFn: MapFn<TSecond, TKey>, joinFn: CombineFn<TElement, Iterable<TSecond>, TResult>): Lazy<TResult>
    • +
    +
      +
    • + +
      +
      +

      Joins 2 iterables on the given key and groups the results.

      +
      +
      +
      remarks
      +

      This will iterate the second iterable completely once it has + started iteration (not before). It will not cause additional unexpected iteration + on the underlying iterable.

      +
      +
      +
      +

      Type parameters

      +
        +
      • +

        TSecond

        +
      • +
      • +

        TKey

        +
      • +
      • +

        TResult

        +
      • +
      +

      Parameters

      +
        +
      • +
        second: Iterable<TSecond>
        +
        +

        The other iterable to group join with.

        +
        +
      • +
      • +
        firstKeyFn: MapFn<TElement, TKey>
        +
        +

        The function that extracts the key from an element + of the first iterable.

        +
        +
      • +
      • +
        secondKeyFn: MapFn<TSecond, TKey>
        +
        +

        The function that extracts the key from an element + of the second iterable.

        +
        +
      • +
      • +
        joinFn: CombineFn<TElement, Iterable<TSecond>, TResult>
        +
        +

        The function that takes an element from the first and an + iterable of elements from the second, and outputs the resulting element.

        +
        +
      • +
      +

      Returns Lazy<TResult>

      +
    • +
    +

    intersect

    @@ -1081,7 +1153,7 @@

    intersect

  • @@ -1179,7 +1251,7 @@

    join

  • @@ -1191,7 +1263,7 @@

    join

    remarks

    This will iterate the second iterable completely once it has started iteration (not before). It will not cause additional unexpected iteration - on the underlaying iterable.

    + on the underlying iterable.

    @@ -1519,7 +1591,7 @@

    orderBy

  • @@ -1570,7 +1642,7 @@

    orderByDecending

  • @@ -1621,7 +1693,7 @@

    prepend

  • @@ -1686,7 +1758,7 @@

    reverse

  • @@ -1714,7 +1786,7 @@

    select

  • @@ -1756,7 +1828,7 @@

    selectMany

  • @@ -1888,7 +1960,7 @@

    skip

  • @@ -1925,7 +1997,7 @@

    skipLast

  • @@ -1962,7 +2034,7 @@

    skipWhile

  • @@ -2106,7 +2178,7 @@

    take

  • @@ -2143,7 +2215,7 @@

    takeLast

  • @@ -2178,7 +2250,7 @@

    takeWhile

  • @@ -2324,7 +2396,7 @@

    union

  • @@ -2378,7 +2450,7 @@

    where

  • @@ -2411,7 +2483,7 @@

    Returns
    @@ -2448,7 +2520,7 @@

    zip

  • +
  • + groupJoin +
  • intersect
  • diff --git a/docs/index.html b/docs/index.html index cc03d86..9eb3903 100644 --- a/docs/index.html +++ b/docs/index.html @@ -90,7 +90,7 @@

    Contents

    Installation

    Deno

    Use the following import:

    -
    import { Lazy } from 'https://deno.land/x/lazy@v1.1.0/mod.ts';
    +
    import { Lazy } from 'https://deno.land/x/lazy@v1.2.0/mod.ts';

    Make sure the @v{version} tag is the correct one you want. I'd recommend against master, as it could change without notice & might be broken (although I will try not to break it).

    Node

    The packge can be found here: https://www.npmjs.com/package/@luvies/lazy.

    @@ -111,12 +111,12 @@

    Overview

    function repeat<TElement>(element: TElement, count?: number): Lazy<TElement>;

    The Lazy class is the root of the module, all things come from it and are derived off it. To start using it, do something like the following:

    // Static method import.
    -import { Lazy } from 'https://deno.land/x/lazy@v1.1.0/mod.ts';
    +import { Lazy } from 'https://deno.land/x/lazy@v1.2.0/mod.ts';
     
     const iterable = Lazy.from([1, 2, 3, 4, 5]);
     
     // Direct function import.
    -import { from } from 'https://deno.land/x/lazy@v1.1.0/mod.ts';
    +import { from } from 'https://deno.land/x/lazy@v1.2.0/mod.ts';
     
     const iterable = from([1, 2, 3, 4, 5]);

    After you have done this, the full power of the module is available to play with.

    diff --git a/lib/iterators.ts b/lib/iterators.ts index ebe5324..eacfd64 100644 --- a/lib/iterators.ts +++ b/lib/iterators.ts @@ -534,6 +534,28 @@ export abstract class Lazy implements Iterable { return new LazyExcept(this, second, compareOn); } + /** + * Joins 2 iterables on the given key and groups the results. + * @param second The other iterable to group join with. + * @param firstKeyFn The function that extracts the key from an element + * of the first iterable. + * @param secondKeyFn The function that extracts the key from an element + * of the second iterable. + * @param joinFn The function that takes an element from the first and an + * iterable of elements from the second, and outputs the resulting element. + * @remarks This will iterate the second iterable completely once it has + * started iteration (not before). It will not cause additional unexpected iteration + * on the underlying iterable. + */ + public groupJoin( + second: Iterable, + firstKeyFn: MapFn, + secondKeyFn: MapFn, + joinFn: CombineFn, TResult>, + ): Lazy { + return new LazyGroupJoin(this, second, firstKeyFn, secondKeyFn, joinFn); + } + /** * Returns the set intersection between 2 iterables. This like doing an AND * over the 2 iterables. @@ -562,7 +584,7 @@ export abstract class Lazy implements Iterable { * the first and second iterables, and outputs the resulting element. * @remarks This will iterate the second iterable completely once it has * started iteration (not before). It will not cause additional unexpected iteration - * on the underlaying iterable. + * on the underlying iterable. */ public join( second: Iterable, @@ -1090,6 +1112,42 @@ class LazyExcept extends Lazy { } } +/** + * @hidden + */ +class LazyGroupJoin extends Lazy { + public constructor( + private readonly _firstIterable: Iterable, + private readonly _secondIterable: Iterable, + private readonly _firstKeyFn: MapFn, + private readonly _secondKeyFn: MapFn, + private readonly _joinFn: CombineFn, TResult>, + ) { + super(); + } + + public *[Symbol.iterator](): Iterator { + const secondMap = new Map(); + for (const secondElement of this._secondIterable) { + const key = this._secondKeyFn(secondElement); + let arr = secondMap.get(key); + if (!arr) { + arr = []; + secondMap.set(key, arr); + } + arr.push(secondElement); + } + + for (const firstElement of this._firstIterable) { + const key = this._firstKeyFn(firstElement); + const secondElements = secondMap.get(key); + if (secondElements) { + yield this._joinFn(firstElement, secondElements); + } + } + } +} + /** * @hidden */ diff --git a/test/iterators.spec.ts b/test/iterators.spec.ts index 0f1a47f..20ab7de 100644 --- a/test/iterators.spec.ts +++ b/test/iterators.spec.ts @@ -119,6 +119,44 @@ test(function except() { assert.equal(Lazy.from(orig).except([4, 5]).toArray(), [1, 2, 3]); }); +test(function groupJoin() { + const first = [ + { key: 1, value: 5 }, + { key: 2, value: 4 }, + { key: 3, value: 3 }, + { key: 4, value: 2 }, + { key: 5, value: 1 }, + { key: 8, value: 1 }, + ]; + const second = [ + { key: 1, value: 'a' }, + { key: 2, value: 'b' }, + { key: 3, value: 'c' }, + { key: 4, value: 'd' }, + { key: 5, value: 'e' }, + { key: 1, value: 'f' }, + { key: 2, value: 'g' }, + { key: 3, value: 'h' }, + { key: 4, value: 'i' }, + { key: 9, value: 'j' }, + ]; + assert.equal( + Lazy.from(first).groupJoin( + second, + f => f.key, + s => s.key, + (f, s) => ({ key: f.key, firstValue: f.value, secondValues: Array.from(s).map(v => v.value) }), + ).toArray(), + [ + { key: 1, firstValue: 5, secondValues: ['a', 'f'] }, + { key: 2, firstValue: 4, secondValues: ['b', 'g'] }, + { key: 3, firstValue: 3, secondValues: ['c', 'h'] }, + { key: 4, firstValue: 2, secondValues: ['d', 'i'] }, + { key: 5, firstValue: 1, secondValues: ['e'] }, + ], + ); +}); + test(function itersect() { const orig = [1, 2, 3, 4, 5]; assert.equal(Lazy.from(orig).intersect([1, 2, 3]).toArray(), [1, 2, 3]);