Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Simple interface for checking structure of JS code against a template, backed by Esprima.
structured.js is a Javascript library that provides a simple interface for static analysis of Javascript code, backed by the abstract syntax tree generated by Esprima. Structured.js works in-browser <script src='structured.js'></script>
, or as a standalone npm module.
var structure = function structure() {
var _ = _;
if (_ % 2 == 1) {
_ += 1;
}
};
var code = "var a = 11; var b = 1; if (a % 2 == 1) { b += 1;}"
var result = Structured.match(structure, code); // true
Check out the test suite for more.
demo/demo.html
provides a user interface to create and test wildcard structures. The demo page is a good way to get a feel for the analysis and generate QUnit tests.
Run structured.js tests with npm test
or by opening browser-test/index.html.
Esprima and UnderscoreJS for the framework, QUnit for the test suite.
FAQs
Simple interface for checking structure of JS code against a template, backed by Esprima.
The npm package structured receives a total of 0 weekly downloads. As such, structured popularity was classified as not popular.
We found that structured demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.