
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@masx200/acorn-parse-escodegen-generate-esm-broweser
Advanced tools
在浏览器中使用 acorn和escodegen 来 进行 javascript 源代码 和 抽象语法树的相互转换的ES模块
可以在浏览器中运行,不需要nodejs环境,压缩后体积为155KB
使用 acorn
和escodegen
来 进行 javascript
源代码 和 抽象语法树
的相互转换的ES
模块,
把escodegen
和estraverse
和esutils
模块都从commonjs
模块改成ES
模块,acorn
使用自带的ES
模块
并且使用rollup
打包,并开启tree-shaking
和使用terser
代码压缩
依赖的模块
{
"dependencies": {
"acorn": "^6.2.1",
"escodegen": "^1.11.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.3"
}
}
从 cdn 获取
<script type="module">
import {
parse,
generate
} from "https://cdn.jsdelivr.net/gh/masx200/acorn-parse-escodegen-generate-esm-broweser@latest/dist/acorn-parse-escodegen-generate.esm.min.js";
</script>
npm install --save https://github.com/masx200/acorn-parse-escodegen-generate-esm-broweser.git
或者
yarn add https://github.com/masx200/acorn-parse-escodegen-generate-esm-broweser.git
import { parse, generate } from "acorn-parse-escodegen-generate-esm-broweser";
var code = "var b=3";
var ast = parse(code);
var text = generate(ast);
A small, fast, JavaScript-based JavaScript parser
https://github.com/acornjs/acorn
https://npm.taobao.org/package/acorn
ECMAScript code generator
FAQs
在浏览器中使用 acorn和escodegen 来 进行 javascript 源代码 和 抽象语法树的相互转换的ES模块
The npm package @masx200/acorn-parse-escodegen-generate-esm-broweser receives a total of 0 weekly downloads. As such, @masx200/acorn-parse-escodegen-generate-esm-broweser popularity was classified as not popular.
We found that @masx200/acorn-parse-escodegen-generate-esm-broweser 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.