
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
boosterfilters
Advanced tools
BoostFilters is a JavaScript package that generates Sequelize filters from a provided dictionary. It supports a wide range of filter types, including full-text search, greater than, less than, equals, and more.
Install BoostFilters via npm:
npm install boostfilters
or via yarn:
yarn add boostfilters
First, import the generateFilterConditions function from the boostfilters package:
import { generateFilterConditions } from "boostfilters";
you can use it to build Sequelize queries:
const filters = {
"name.fulltext": "John Doe",
"age.greaterThan": 30,
"createdAt.range": ["2022-01-01", "2023-01-01"],
};
const sequelizeFilters = generateFilterConditions(filters);
// Use `sequelizeFilters` in your Sequelize queries
In this example, sequelizeFilters will be an object suitable for use in a Sequelize where clause.
Query Types The generateFilterConditions function supports a variety of query types:
The keys of the query object should be the name of the field you want to query on, followed by a period and the type of the query. Here's a brief overview of each type:
fieldName.fulltext
: Performs a "LIKE" search on fieldName. Matches any records where fieldName contains the provided value.
fieldName.equals
: Matches any records where fieldName is exactly equal to the provided value.
fieldName.greaterThan
: Matches any records where fieldName is greater than the provided value.
fieldName.lessThan
: Matches any records where fieldName is less than the provided value.
fieldName.range
: Matches any records where fieldName is within the provided range. The value for this query type should be an array with two elements: the start of the range and the end of the range.
fieldName.between
: Matches any records where fieldName is between the two provided values.
fieldName.lessThanOrEqual
: Matches any records where fieldName is less than or equal to the provided value.
fieldName.greaterThanOrEqual
: Matches any records where fieldName is greater than or equal to the provided value.
You can also query associated tables by using the name of the associated table as a prefix to the field name, separated by a period. For example, to query the name field on an associated users
table entries, you would use the key users.name.fulltext
.
FAQs
Sequalize filter DSL
The npm package boosterfilters receives a total of 1 weekly downloads. As such, boosterfilters popularity was classified as not popular.
We found that boosterfilters 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.