Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
babel-plugin-ynw
Advanced tools
Readme
1.安装
npm i --save-dev babel-plugin-ynw
2.配置
// .babelrc文件
{
plugins: ["ynw"];
}
自动注册 Vue 组件
// 自动注册 comps 文件夹下面的 .vue 文件为 VUE 组件 (带有 yn 前缀)
// 出于性能的考虑, 没有设置自定义参数, 也就是说需要把组件放在 "comps" 文件夹
ynRegisteVueComps();
// 以上一行代码会转义为这一坨代码
const compContext = require.context("./comps", true, /\.vue$/);
compContext.keys().forEach(p => {
const getCompPathName = path => {
const match = path.match(/\w+?(?=\/)/g);
if (!match) return "";
return match.map(item => item.replace(/\//g, "")).join("-") + "-";
};
const name = p.match(/([\w\-]+)\.vue$/)[1];
const folder = getCompPathName(p);
const option = compContext(p).default;
Vue.component("yn-" + folder + name, option);
});
FAQs
1.安装
The npm package babel-plugin-ynw receives a total of 3 weekly downloads. As such, babel-plugin-ynw popularity was classified as not popular.
We found that babel-plugin-ynw 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.