arrayv2

0.1.4-a • Public • Published

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 } ] }

Package Sidebar

Install

npm i arrayv2

Weekly Downloads

1

Version

0.1.4-a

License

ISC

Unpacked Size

643 kB

Total Files

18

Last publish

Collaborators

  • murphyisabitch