Starting linq.js ver.3.0.0(currently beta)

Jul 19, 2012 at 12:35 PM
Edited Jul 19, 2012 at 12:41 PM

Thank you for many opinions.

In addition, I'm sorry that an answer was late and that work was late.

There was the dissenting opinion, too, but was changed to lowerCamelCase.
This update will put all of you under a pain.
However, I think that I was able to offer more value at the same time.

Please enjoy new linq.js and give feedback.


all methods rename UpperCamelCase to lowerCamelCase

following methods are changed name
Return -> make
CascadeBreadthFirst -> traverseBreadthFirst
CascadeDepthFirst -> traverseDepthFirst
BufferWithCount -> buffer
ToString -> toJoinedString
Do -> doAction
Let -> letBind
MemoizeAll -> memoize
Catch -> catchError
Finally -> finallyAction
ToJSON -> toJSONString

following methods are changed behavior
writeLine : document.write(value + "<br />") -> document.writeln(value), overload changed
zip, concat allow multiple arguments

add utility methods

add enumerable methods

performance optimization
where->select and where->where,... and select->select,...
range, rangeDown, rangeTo

add new extension

fix extensions to latest library version

removed jQuery plugin version


I will work on improvement IntelliSense for Visual Studio 2012 and reference.
If it is over, ship ver.3 stable release.

JSDoc, the Closure Compiler are after it.
In addition, if there is what request and I forget, please teach it.


// new feature, extendTo


[1, 2, 3].where("$%2==0").select("$*$");

// extreme improvement IntelliSense for VS2012

// QUnit extension

Math.pow(10, 2).is(100); // strictEqual(Math.pow(10, 2), 100)

Enumerable.rangeTo(10, 15, 2).is(10, 12, 14); // deepEqual(Enumerable.rangeTo(10, 15, 2).toArray(), [10, 12, 14])

[1, 5, 10].all("$<12").isTrue(); // collection assertion with linq.js!
Jul 26, 2012 at 4:35 PM


today I released v3.0.1-Beta2.

fix bug indexOf
writeLine overload back to v2
fixed bug, extendTo(Array) isn't optimized for Array
fixed bug, defer define "enumerator" to global
indexOf, lastIndexOf allow predicate
changed Enumerable.from(object) enumerate only own property
improvement all code snippets
add isExpr to linq.qunit.js


thank you for suggestion, BogdanMart and erikkallen.

Sep 11, 2012 at 6:22 AM

Wow!! Now it is an elegant Javascript Library!! I really liked the lowercase change!

JS is JS! C# is C#!!

Sep 16, 2012 at 2:11 PM
Edited Sep 16, 2012 at 2:11 PM


today I release v3.0.2-RC.
Next will be stable version.


fix orderByDescending to stable sort
remove scan resultSelector overload
rename tojQueryRaw to tojQueryAsArray
flip argument of firstOrDefault,lastOrDefault,singleOrDefault. first is predicate, second is defaultValue.
defaultValue of orDefault changed to null
Enumerable.choice and Enumerable.cycle allow Enumerable
Enumerable.from supports IIterable<T>(WinMD)
argument of alternate allows Enumerable
add AMD support("linqjs")
improved fit to latest RxJS(on GitHub Sep 10, 2012 version)
repositry convert to git

thank you for suggestion, smogami, robertob and adimkov.

Oct 9, 2012 at 2:47 PM


today I release v3.0.3-Beta4.
This change is mainly add TypeScript support. 

TypeScript support is experimental.
Please give me a feedback. 

and sorry, I returned version from RC to Beta. 

Jan 29, 2013 at 8:34 PM

Hi I have just discovered this library and I think using this with typescript is real power for modern HTML based applications. we plan to use it in production environment, but those bugs u fix from beta version to beta version scares us a little bit. can u confirm using this beta with typescript support is ok? and what are some serious bugs u think might prevent us from using this library in enterprise level application?

Jan 30, 2013 at 8:08 AM

Thank you.

at first, TypeScript support is only definition.
Therefore, there have no critical problem.
# But TypeScript ver.0.8.3 will provide generics(current is 0.8.2).
# Of course linq.js supports generics then.
# It maybe brings a big change.

Core (linq.js) is still beta.
However, a half year passes the considerable bug is removed and has high stability.
The some changes may be given yet, but the big breaking change is not.

My message is all right.
I want you to use linq.js with TypeScript for products.

Mar 8, 2013 at 8:12 AM
Thanks for your AMAZING JOB create this library. I agree to change function names to lowercase. But I'm not gonna using 3.0 in my project cause lot of codes are using UpperCase. So will you consider to make a back compability adapter library like jQuery-Migrate.js? I thinks those are just a little alias-name work.

What do you think?
Jun 19, 2013 at 8:55 PM
Edited Jun 19, 2013 at 8:56 PM

today I release v3.0.4-Beta5.

add TypeScript Generic definition and some definition fixes.

sorry for all, I'm so busy, and I lost many changes in an accident on my pc.
I received disappointment and I lose a motivation.
However, Generics of TypeScript led to the revival.
I make ver.3 by all means.
I am sorry, but, please wait a little more.
Jul 10, 2013 at 10:30 PM
Edited Jul 10, 2013 at 10:31 PM
Hi neuecc - I came across an issue using ForEach function today with IE8 browser or lower. This function adds an extra index to the array object & cause the null exception. It worked great on IE9 or above. I am wondering if this is a known issue & if so is there a fixed for this issue or workaround solution?

Aug 26, 2013 at 11:19 PM
Edited Aug 26, 2013 at 11:22 PM
Thanks for your great work. I've found a small typo in the beta 5 reference page in the examples on groupBy and partitionBy:
Enumerable.from([{d:new Date(2000,1,1),i:0},{d:new Date(2000,1,1),i:1}])
Enumerable.from([{d:new Date(2000,1,1),i:0},{d:new Date(2000,1,1),i:1}])
e.Select should be
Aug 27, 2013 at 9:35 PM
One of the overloads for the groupBy function is the defined in the type file as:
groupBy<TKey, TElement, TResult, TCompare>(keySelector: (element: T) => TKey, elementSelector: (element: T) => TElement, resultSelector: (key: TKey, element: IEnumerable<TElement>) => TResult, compareSelector: (element: T) => TCompare): IEnumerable<TResult>;
But the compareSelector gets the key as the parameter i.e. it should be defined as compareSelector: (key: TKey) => TCompare
Sep 27, 2013 at 3:38 PM
Sorry to beat a dead horse, but what's the status of these betas and do you have any timeline for a v3 release?
Feb 26, 2014 at 6:50 PM
I hope someone decides to fork this project and continues developing it. It's really a shame that @neuecc seems to have abandoned it.
Jul 27, 2014 at 8:50 AM
Edited Jul 27, 2014 at 8:54 AM

I'm working on a .NET port to TypeScript that includes LINQ.
This is such a great library, that I don't see why it isn't simply coded from the beginning in TypeScript. Also the definition files (I made a submission to DefinitelyTyped to include generics, but not sure how far I'll go) don't include appropriate types/generics.

I am avoiding the use of lambdas as strings since TypeScript handles this for you and I think from a clean/typed architecture it would be better to compile your lambdas separately.

I have done quite a bit of work on this to reach some level of parity with linqjs 3.
If you are interested in porting linqjs to TypeScript source, please let me know, I'd be glad to help, and of course take any code I've written in TypeScript.NET to help you. I have found some interesting improvements in usage, readability, and reuse. Take a look.
Aug 4, 2014 at 8:48 AM
A lot more updates to today.
It's not a complete rewrite, but I have meticulously rewritten every function into TypeScript as well as making some optimizations.
I'm getting very close to parity.