Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Portage of .NET Enumerable class of linq to nodejs.
npm install linqy
var linqy = require('linqy');
var e = linqy.e;
To use the API the first thing you want to do, is transform your array into an enumerable:
var enumerable = e([1,2,3,4,5]);
Note that if you are using typescript, the type of enumerable will be inferred to linqy.Enumerable.
Then with an enumerable you can call a load of useful functions:
Apply an accumulator function, starting with the seed.
Returns: the final aggregate.
Determines whether all elements satisfy a condition.
Returns: a boolean.
Determines whether any elements satisfy a condition.
Returns: a boolean.
Computes the average value of the elements.
Returns: a number.
Typescript usage only.
Cast the generic type of the enumerable.
Returns: a linqy.Enumerable.
Concatenates with another enumerable.
Returns: a linqy enumerable.
Determines whether an item is contained.
Returns: a boolean.
Returns the number of elements satisfying a predicate.
Returns: a number.
Returns distinct elements by using a predicate to establish the distinction criterion.
Returns: a linqy enumerable.
Returns the element at the given position.
Returns: the item.
Returns an empty enumerable. Very handy in a typescript context.
Returns: an empty linqy enumerable.
Produces the difference with another enumerable, containing items not available in the two enumerables.
Returns: A linqy enumerable.
Returns the first element satisfying a predicate.
Returns: the item.
Calls a function on every items.
Returns: nothing.
Groups the elements by using a predicate to establish the grouping value.
Returns: a linqy enumerable of grouping object. The grouping object has a key field representing the grouping value, it is an linqy enumerable itself of the items within the group.
Produces the intersection with another enumerable, containing items only available in the two enumerables.
Returns: A linqy enumerable.
Correlates the elements with another enumerable by using predicates to establish matching keys and result.
Returns: A linqy enumerable.
Returns the last element satisfying a predicate.
Returns: the item.
Returns the item having the maximum decimal value by using a predicate to establish the decimal value.
Returns: the item.
Returns the item having the minimum decimal value by using a predicate to establish the decimal value.
Returns: the item.
Sorts the items in an ascending order by using a predicate to establish the sorting value.
Returns: a linqy enumerable.
Sorts the items in a descending order by using a predicate to establish the sorting value.
Returns: a linqy enumerable.
Inverts the order of the items.
Returns: a linqy enumerable.
Transforms each items by using a predicate.
Returns: a linqy enumerable.
Transforms each items by using a predicate and flattens it into a single enumerable.
Return: a linqy enumerable.
Returns the only element satisfying a predicate, throwing an exception if no or more that on element is available.
Returns: the item.
Bypasses the specified number of elements, keeping the remaining ones.
Return: a linqy enumerable.
Bypasses the elements while they are satisfying a predicate, keeping the remaining ones.
Return: a linqy enumerable.
Computes the sum of the elements.
Returns: a number.
Keeps the specified number of elements, ignoring the remaining ones.
Return: a linqy enumerable.
Keeps the elements while they are satisfying a predicate, ignoring the remaining ones.
Return: a linqy enumerable.
Subsequent sorts the items in an ascending order by using a predicate to establish the sorting value.
Returns: a linqy enumerable.
Subsequent sorts the items in a descending order by using a predicate to establish the sorting value.
Returns: a linqy enumerable.
Produces the union with another enumerable, containing distinct items available in the two enumerables.
Returns: A linqy enumerable.
Creates an array from the current enumerable.
Returns: plain array.
Filter the items by keeping elements satisfying a condition.
Returns: a linqy enumerable.
Merge with another enumerable by using a predicate.
Returns: a linqy enumerable.
FAQs
Linq impletation for nodejs, originaly made in typescript.
We found that linqy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.