
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
linqscript
Advanced tools
make sure to use a working module loader like browserify
import { List } from './linqscript/source/source';
var fruits = new List<string>();
fruits.Add("apple");
fruits.Add("banana");
var fruit = fruits.Where(x => x === "apple").First();
You can use of course more complex objects:
enum Color {
Green,
Red
}
class Fruits {
public Name: string;
public Color: Color;
}
var fruits = new List<Fruits>();
var apple = new Fruit();
apple.Color = Color.Green;
apple.Name = "Apple";
fruits.Add(apple);
var redApple = new Fruit();
redApple.Color = Color.Red;
redApple.Name = "Apple";
fruits.Add(redApple);
var kiwi = new Fruit();
kiwi.Color = Color.Green;
kiwi.Name = "Kiwi";
fruits.Add(kiwi);
fruits.Where(x => x.Color === Color.Green);
Output:
{
"Fruits": [{
"Name": "Kiwi",
"Color": 1
}, {
"Name": "Apple",
"Color": 1
}]
}
fruits.Select(x => x.Color);
{
"Color": [
"Green",
"Red"
]
}
fruits.Distinct(x => x.Name)
{
"Name": [
"Apple",
"Kiwi"
]
}
<script type="text/javascript" src="scripts/linqscript.js"></script>
Method | Description | Parameter |
---|---|---|
Where | Returns list, where delegate returns true. | Delegate |
Select | Returns list of selected value | Delegate |
Distinct | Returns grouped selected value. | Delegate |
First | Returns first item in list. | |
Last | Returns last item in list. | |
Add | Adds element to list. | item |
AddRange | Adds each item in given list. | items |
RemoveAt | Removes item from list by index. | index |
Remove | Removes item from list. | item |
IndexOf | Gets index of given item. | item |
Contains | Return true if list contains given item. | item |
Get | Gets item by index. | index |
Clear | Clears list. | |
ToArray | Converts list to array. Important for serialization. | item |
Count | Returns listcount. | |
Count | Returns listcount by delegate. | Delegate |
Any | Returns true if list contains any item. | |
Any | Returns true if list contains any item by delegate. | Delegate |
Equals | Compares list with another list. Returns true if lists are equal. If comparePosition is set to false, equality will be checked without comparison on position | item , comparePosition (default true) |
ToList | Converts an Array to list. Important for e.g. ajax calls |
FAQs
C# alike List in Javascript. Simple lightweight lambda syntax library for Typescript, extending Array. Works with Angular
The npm package linqscript receives a total of 6 weekly downloads. As such, linqscript popularity was classified as not popular.
We found that linqscript 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.