
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
ts-linq-builder
Advanced tools
QueryBuilder
is a TypeScript class that provides LINQ-like querying capabilities for collections. It allows you to perform common operations such as where
, select
, join
, sum
, average
, min
, max
, and more on your data collections.
To use QueryBuilder
in your project, you can install it via npm:
npm ts-linq-builder
Here's how you can use QueryBuilder in your TypeScript project:
import QueryBuilder from "ts-linq-builder";
const users = [
{ id: 1, name: "John" },
{ id: 2, name: "Jane" },
];
const userDetails = [
{ id: 1, age: 30 },
{ id: 2, age: 20 },
];
const queryBuilder = new QueryBuilder(users);
queryBuilder
.join(userDetails, (outer, inner) => outer.id === inner.id, (outer, inner) => {
return {
id: outer.id,
name: outer.name,
age: inner.age,
};
})
.forEach(item => console.log(item));
See more Example
QueryBuilder supports the following operations:
Feel free to contribute to this project by opening issues or submitting pull requests. We welcome your suggestions and improvements.
This project is licensed under the MIT License.
FAQs
Typescript Linq Implementation
The npm package ts-linq-builder receives a total of 3 weekly downloads. As such, ts-linq-builder popularity was classified as not popular.
We found that ts-linq-builder 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.