After lurking around Channel9 for quite some time now, I think it's time to step out of the shadows and actually post something. So here goes:
I wrote a complete implementation of LINQ to Objects in JavaScript (but you already know that because you've read the title).
What does complete mean? Well, it means two things:
a) System.Linq.Enumerable is there (except it's called jsinq.Enumerable) and it has all the same methods... all of them (except those related to casting which don't really apply to JavaScript)
b) There's a query compiler that allows you write queries in LINQ-syntax.
c) (Did I say two things, I mean three) If you know LINQ (to Objects) and JavaScript, you know JSINQ!
But don't take my word for it, try it yourself! (Yes, I do watch a lot of infomercials, why do you ask?)
So you can almost write something like this:
from customer in $0
group customer by customer.lastname into g
select {lastname: g.getKey(), count: g.count()}
into r
orderby r.count descending
select r
Except you have to put quotes around it (so it's not really Language INtegrated Query, more like Language bolted-onto Query). But it's still really useful and it's free (as in MIT-licensed), so get yours now!
More importantly though, tell me what you think and please report bugs if you should find some.
JSINQ on CodePlex
Try JSINQ online!
Read about JSINQ on my blog
Cheers,
Kai