Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
matches-where-query
Advanced tools
This function determines if the provided `object` matches every comparison clause in `whereQuery`, returning `true` or `false` accordingly.
This function determines if the provided object
matches every comparison clause in whereQuery
, returning true
or false
accordingly.
whereQuery
is an object of the form:
{
<attribute> : <value>
<attribute> : [ <value1>, ..., <valueN> ]
<attribute> : { comparator : <comparator>, value : <value> }
}
For each clause in whereQuery
, an attribute of object
is compared to a value (primitive or object.)
If the attribute is a single value, object.attribute
must strictly equal the value to result in a match.
{
<attribute> : <value>
}
If the attribute is is an array, only records for which object.attribute
is strictly equally to one of the elements in the array will result in a match.
{
<attribute> : [ <value1>, ..., <valueN> ]
}
The compared attribute must must not be strictly equal to the value to result in a match.
{
<attribute> : { comparator : 'doesNotEqual', value : <value> }
}
The compared attribute must be greater than the value to result in a match.
{
<attribute> : { comparator : 'isGreaterThan', value : <value> }
}
The compared attribute must be greater than or equal to the value to result in a match.
{
<attribute> : { comparator : 'isGreaterThan', value : <value> }
}
The compared attribute must be less than the value to result in a match.
{
<attribute> : { comparator : 'isLessThan', value : <value> }
}
The compared attribute must be less than or equal to the value to result in a match.
{
<attribute> : { comparator : 'isLessThanOrEqualTo', value : <value> }
}
The compared attribute must be between the minimum and maximum values provided to result in a match. The limits provided are included in the range for the value.
{
<attribute> : { comparator : 'isBetween', value : [ <minValue>, <maxValue> ] }
}
FAQs
This function determines if the provided `object` matches every comparison clause in `whereQuery`, returning `true` or `false` accordingly.
The npm package matches-where-query receives a total of 21 weekly downloads. As such, matches-where-query popularity was classified as not popular.
We found that matches-where-query 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.