
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.
logic-filter-strings
Advanced tools
A parser that transforms logical expression strings for filtering JSON objects into their equivalent logic filter structure.
#Example
var logicFilterString = require('logic-filter-strings');
var obj = logicFilterString('foo === "bar"&&bar === "baz qux"');
Obj will be:
[['foo', '===', 'bar'], '&&', ['bar', '===', 'baz qux']]
##Filter Language
This interpreter was desgined with the end goal of being able to provide rules for filtering JSON object streams. It was meant to be used by node-logic-filter
as the means of parsing filter rules. In general, strings on the left side of an equality represent keys in an object, and strings/numbers/arrays/objects on the right side of an equality represent values to compare against. You are also able to use &&, ||, and ! to combine conditions/expressions as you might expect.
###Case: foo exists in the comparison object
'foo'
###Case: foo does not exist in the comparison object
'!foo'
###Case: foo equals string
'foo === "bar"'
Note: The quotes around "bar" are required
###Case: foo equals array
'foo === [1, 2, 3]'
###Case: foo equals object
'foo === {bar: "baz"}'
###Case: foo equals string and bar equals string
'foo == "baz" && bar == "qux"'
Note: ==
and ===
are interchangeable
###Case: foo does not equal string
'foo !== "baz"'
###Case: field on a nested object equals string
'foo.bar.qux === "baz"'
###Case: Or-ing 3 or more conditions
'(foo == "baz" || bar == "qux") || a === "b"'
Note: Parentheses are necessary
FAQs
An algebraic expression parser for stream logic filters
The npm package logic-filter-strings receives a total of 68 weekly downloads. As such, logic-filter-strings popularity was classified as not popular.
We found that logic-filter-strings 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.
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.