
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@tool-developer/wx-async
Advanced tools
Async是一个实用模块,它为异步JavaScript提供了直接、强大的函数处理流程。
可以参考async-es@2.6.3。
由于小程序体积限制,该模块并未提供async的全部方法,只对我提供了一下三个:auto, parallel,series。
之所以使用async-es@2.6.3,是因为v3.*在iOS 9上会脚本报错(非微信环境出现过,所以降级使用2.6.3的版本)。
npm install --save @tool-developer/wx-async
or
yarn add @tool-developer/wx-async
import async from '@tool-developer/wx-async'
var callOrder = [];
async.auto({
task1: ['task2', function(results, callback){
setTimeout(() => {
callOrder.push('task1');
callback();
}, 25);
}],
task2(callback){
setTimeout(() => {
callOrder.push('task2');
callback();
}, 50);
},
task3: ['task2', function(results, callback){
callOrder.push('task3');
callback();
}],
task4: ['task1', 'task2', function(results, callback){
callOrder.push('task4');
callback();
}],
task5: ['task2', function(results, callback){
setTimeout(() => {
callOrder.push('task5');
callback();
}, 0);
}],
task6: ['task2', function(results, callback){
callOrder.push('task6');
callback();
}]
},(err) => {
console.log(callOrder);//['task2','task3','task6','task5','task1','task4']
})
只提供了一下几个方法。
FAQs
wx miniprogram async task support
We found that @tool-developer/wx-async 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 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.