Gathering detailed insights and metrics for iterable-query-linq
Gathering detailed insights and metrics for iterable-query-linq
Gathering detailed insights and metrics for iterable-query-linq
Gathering detailed insights and metrics for iterable-query-linq
@daniel.pickett/linq-js
A javascript library which adds [C# LINQ](https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable?view=net-6.0) inspired helper methods for iterators. Supported in Node.js and web browsers.
jinqu
Querying infrastructure for JavaScript, with Linq style
@tynq/core
TypeScript Integrated Query (@core)
t-streams
Tool for querying iterables.
LINQ-like syntax via ECMAScript tagged templates
npm install iterable-query-linq
Typescript
Module System
Node Version
NPM Version
TypeScript (90.39%)
JavaScript (9.61%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
5 Stars
23 Commits
1 Watchers
2 Branches
1 Contributors
Updated on Mar 30, 2022
Latest Version
0.1.0
Package Id
iterable-query-linq@0.1.0
Unpacked Size
270.53 kB
Size
42.47 kB
File Count
30
NPM Version
6.4.1
Node Version
10.11.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
29
LINQ-like syntax using tagged templates.
npm install iterable-query-linq
1import { linq } from "iterable-query-linq"; 2 3const q = linq` 4 from user of ${users} 5 where user.name === "Alice" 6 select user 7`;
A query must begin with a from
clause, may consist of zero or more other clauses, and must end with either a group
clause or a select
clause:
1linq` 2 from user of ${users} 3 select user 4` 5 6linq` 7 from user of ${users} 8 where user.active 9 group user by user.role 10`
from
ClauseThe from
clause is used to bind an identifier to each element in an expression:
from ID of SOURCE
Multiple from
clauses can be chained together to form a cartesian join, resulting
in the cartesian product of the elements in each sequence.
If source is an async iterable, you must indicate async iteration using the await
modifier. Async iteration is only supported in a linq.async
block.
1linq.async` 2 from await symbol of ${asyncStockTicker} 3 where symbol.name === "NASDAQ" 4 select symbol.value 5`
join
ClauseThe join
clause is used to define a one-to-one relationship between the elements two iterables. All joins
are performed using an "equijoin" comparing the strict equality of the keys
selected from the outer and inner iterables:
join INNER_ID of INNER_SOURCE on OUTER_KEY equals INNER_KEY
join into
ClauseThe join into
clause is similar to the join
clause except that it creates a one-to-many relationship in the form of a group join:
join INNER_ID of INNER_SOURCE on OUTER_KEY equals INNER_KEY into ID
let
ClauseThe let
clause creates a variable binding that persists through the query body
and is used to capture per-element state:
let ID = EXPRESSION
1linq` 2 from user of ${users} 3 let fullName = user.firstName + " " + user.lastName 4 select { username: user.username, fullName } 5`
where
ClauseThe where
clause filters the iterable, skipping items that do not match the supplied criteria:
where EXPRESSION
1linq` 2 from x of ${numbers} 3 where x > 10 && x < 20 4 select x 5`
orderby
ClauseThe orderby
Clause is used to sort an iterable using one or more comparators:
orderby EXPRESSION [ascending|descending] [, ...]
1linq` 2 from user of ${users} 3 orderby user.lastName, user.firstName 4 select user 5`
group
ClauseThe group
clause terminates a query and is used to group items with the same key:
group ELEMENT by KEY
1linq` 2 from user of ${users} 3 group user by user.role 4`
group into
ClauseThe group into
clause is similar to the group
clause, except that it introduces
a new binding that can be used in a subsequent query body:
group ELEMENT by KEY into ID
1linq` 2 from user of ${users} 3 group user by user.role into roleUsers 4 orderby roleUsers.key 5 select { role: roleUser.key, users: [...roleUsers] } 6`
select
ClauseThe select
clause terminates a query and is used to select the resulting element
for each element in the source:
select EXPRESSION
1linq` 2 from user of ${users} 3 select user.name 4`
select into
ClauseThe select into
clause is similar to the select
clause, except that it introduces
a new binding that can be used in a subsequent query body:
select EXPRESSION into ID
1linq` 2 from user of ${users} 3 select user.name into name 4 where name !== "Bob" 5 select name 6`
You can run queries using the built-in API as well (requires NodeJS):
1import { parseAndExecuteQuery, parseAndExecuteQueryAsync } from "iterable-query-linq";
2
3...
4
5const users = ...;
6const q = parseAndExecuteQuery(`
7 from user of users
8 select user.name
9`, { users });
10
11...
12
13const asyncUsers = ...;
14const q = parseAndExecuteQueryAsync(`
15 from await user of users
16 select user.name
17`, { users: asyncUsers });
You can also start a NodeJS REPL that evaluates queries:
1import { startLinqRepl } from "iterable-query-linq"; 2 3const users = ...; 4startLinqRepl({ users }); 5 6// > from user of users 7// ... select user.name
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/23 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
49 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More