Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@putout/compare
Advanced tools
Compare AST-nodes.
npm i @putout/compare
node
- AST-node
or code
that will be generated;baseNode
AST-node
with support of template variables
.Any node.
compare('const x = data', 'const __ = __');
compare('const {x} = data', 'const __ = __');
compare('const x = {data}', 'const __ = __');
// returns
true
ObjectPattern
or ObjectExpression
with any count of properties
.
compare('const {} = data', 'const __object = __')
compare('const {hello} = data', 'const __object = __')
// returns
true
ArrayPattern
or ArrayExpression
with any count of elements
.
compare('const [] = data', 'const __array = __');
compare('const [hello] = data', 'const __array = __');
compare('const hello = [data]', 'const __ = __array');
// returns
true
Any count of arguments
:
compare('(a, b, c) => {}', '(__args) => {}');
compare('(a, b) => {}', '(__args) => {}');
compare('() => {}', '(__args) => {}');
// returns
true
Any string literal.
compare('const a = "hello"', 'const __ = "__"');
MIT
FAQs
compare AST-nodes according to 🦎 PutoutScript
The npm package @putout/compare receives a total of 9,543 weekly downloads. As such, @putout/compare popularity was classified as popular.
We found that @putout/compare demonstrated a healthy version release cadence and project activity because the last version was released less than 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.