
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@swanide/component-parser
Advanced tools
使用 Rust + swc 解析小程序 Page,Component 组件中的变量信息,给代码提示模块使用,多文件解析下,性能大概是 acorn 的 10 倍。
使用 Rust 解析 css 类名,支持 @import
多文件并行解析。
使用方法:
import {parseFiles, parseFile, parseCss, parseCssFiles} from '@swanide/component-parser';
// 解析 script meta
const filePaths = [
'test/fixtures/page.js',
'test/fixtures/component.js'
];
// 解析多个文件
const result = parseFiles(filePaths);
console.log(result);
// 解析单个文件
const result = parseFile('test/fixtures/page.js');
console.log(result);
// 解析 css meta
const cssFiles = [
'test/fixtures/page.css',
'test/fixtures/component.css'
];
// 解析多个文件,注意返回的 map 中包含所有被 import 的 css 文件
const result = parseCssFiles(cssFiles);
console.log(result);
// 解析单个文件
const result = parseCss('test/fixtures/page.css');
console.log(result);
最低操作系统版本要求如下,其他操作系统版本会自动走 mock:
FAQs
parse swan component
We found that @swanide/component-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.