arrayv2

New type JavaScript array.

Usage no npm install needed!

<script type="module">
  import arrayv2 from 'https://cdn.skypack.dev/arrayv2';
</script>

README

ArrayV2

New type JavaScript array.

Simple linq functions for javascript arrays!

-Where
-OrderBy
-OrderByDesc
-Select
-SelectMany
-GroupBy

Every functions has a Set version, the Set function will return the end of your data and set your array(for view engines vue, react, angular...)
Use as "WhereSet", "OrderBySet",....

{
var arr = [
{ Id: 1, expStr: "Lorem ipsum dolor sit amet, consectetur adipiscing elit", expBool: true },
{ Id: 2, expStr: "Mauris eget neque eu nulla molestie bibendum", expBool: true },
{ Id: 3, expStr: "Vivamus consequat egestas suscipit.", expBool: false },
{ Id: 4, expStr: "Donec varius eget massa dignissim elementum", expBool: true },
{ Id: 5, expStr: "In a ornare massa, non eleifend risus", expBool: false },
];
var arrV2 = arr.AsV2();
arrV2.Where(x => x.Id > 3); //[ { Id: 4, expStr: "Donec varius eget massa dignissim elementum", expBool: true }, { Id: 5, expStr: "In a ornare massa, non eleifend risus", expBool: false } ] }