
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
dynamic-query-builder
Advanced tools
buildPrismaQuery
FunctionThe buildPrismaQuery
function builds a Prisma query based on flat filter conditions.
buildMongooseQuery
FunctionThe buildMongooseQuery
function builds a Prisma query based on flat filter conditions.
This function takes an object of flat filter conditions and converts it into a Prisma-compatible query object. The filter conditions are expected to be in the format of field_condition: value
, where field
is the name of the field to filter on and condition
is the type of filter to apply.
lt
: Less thanlte
: Less than or equal togt
: Greater thangte
: Greater than or equal tobetween
: Between two values (requires an array with two values)contains
: Contains a value (case-insensitive)c
: Alias for contains
caseSensitiveContains
: Contains a value (case-sensitive)csc
: Alias for caseSensitiveContains
ne
: Not equal toeq
: Equal to
: Equal to (default condition)neContains
: Does not contain a value (case-insensitive)nec
: Alias for neContains
in
: In a list of valuesnin
: Not in a list of valuesfilters
(Object): The flat filter conditions.Error
: Throws an error if the between
filter does not receive an array with two values.const filters = {
age_gt: 30,
name_contains: "John",
status_in: ["active", "pending"],
};
const query = buildPrismaQuery(filters);
console.log(query);
FAQs
A dynamic query builder for Node.js
The npm package dynamic-query-builder receives a total of 23 weekly downloads. As such, dynamic-query-builder popularity was classified as not popular.
We found that dynamic-query-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.