_The shitty version of the C# LINQ-to-objects Enumerable extension methods for JavaScript._
npm install shittylinqArray.prototype mirroring the System.Linq namespace from C#.
bash
npm install shittylinq
`
The library only needs to be imported once. The library exports a single function that needs to be called before the methods can be used. Since the methods are bound to the array prototype, the methods will be available in modules other than where the imported function is called.
`javascript
require('shittylinq')();
[2, 9, 1, 7, 4]
.Where(x => x % 2 !== 0)
.Take(2)
.Aggregate((a, b) => a + b);
// <- 10
`
Developing
Please read the contribution guide before beginning development.
Once the project is cloned, run
`bash
npm install
`
This will set up Git hooks to run Prettier when a commit is made.
Running Tests
Tests are run using Mocha. Chai is used as the assertion library.
`bash
npm test
``