Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
基于http/1.1-chunked + async实现的一种数据分块加载技术。
Either through forking or by using npm (the recommended way):
npm install data-chunk
And data-chunk will be installed in to your node-project.
// ...
var dc = require('data-chunk');
app.get('/', function(req, res, next){
res.render('index', function(error, html){
res.write(html); //先加载页面框架dom,并开启chunked模式
dc.response(res); //设置下dc所需要的response
dc.dcseries({
one: function(callback){
setTimeout(function(){
callback(null, 1);
}, 200);
},
two: function(callback){
setTimeout(function(){
callback(null, 2);
}, 100);
}
},
function(err, results) {
console.log(results);
//此时已经自动调用res.end(),不必显示加载
// results is now equal to: {one: 1, two: 2}
});
});
//如果有前端库ICAT,数据会存放在ICAT.PAGEDATA中;如果无,则存放在window.PAGEDATA中
});
同async的所有方法;
同async的所有方法;
以上方法会自动获取每条task数据,写入PAGEDATA
同async的所有方法;
MIT
FAQs
data chunked
The npm package data-chunk receives a total of 1 weekly downloads. As such, data-chunk popularity was classified as not popular.
We found that data-chunk 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.