
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
pigfarm.js
Advanced tools
对于大部分渲染页面的需求,可以归结为以下模型:
pigfarm.js就是完成这种职责的的一个模块
var pigfarm = require('pigfarm.js');
var app = pigfarm({
render: function(data) {
console.log(data.index); // 腾讯视频首页内容;
return `eat ${data.title.food}`
},
data: {
title: {
type: "static",
value: {
"food": "cabbage"
}
},
index: {
type: "request",
action: {
url: "http://v.qq.com",
fixAfter: function (data) {
return data;
}
}
}
}
});
console.log(await app()) // 输出 'eat cabbage'
其中,type=request的数据源,action内的配置即pigfarm-fetcher的配置方式。这让你可以获取任意的数据。
app.on('fetchstart', function(koacontext) {
})
FAQs
We found that pigfarm.js 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.