
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Simple JS async develpoment, easy error handling, chained results, declarative way.
Simple JS async development.
function fileLoader(path,done){ // File loader simulation.
console.log("Opening file:'"+path+"'...");
if(path==='./secundary2.key'){
//throw new Error("Ops!"); // Error simulation
}
done.result({file:path}); // Finalize task & return result
}
var shared = {}; // Shared closure
var procedure = new Procedure(); // Create procedure
procedure
.add("Load primary",fileLoader,'./primary.key') // Add new task
.add("Load secundary",fileLoader,'./secundary.key') // Add new task
.add("Load shared",fileLoader,'./shared.key') // Add new task
.race() // Resolve tasks in race mode
.add(function(files,done){ // Add new task
shared.files1 = files;
console.log(shared);
done(); // Finalize task
})
.queue() // Resolve tasks in queue mode
.add("Load primary",fileLoader,'./primary2.key') // Add new task
.add("Load secundary",fileLoader,'./secundary2.key') // Add new task
.add("Load shared",fileLoader,'./shared2.key') // Add new task
.race() // Resolve tasks in race mode
.add(function(files,done){ // Add new task
shared.files2 = files;
console.log(shared);
done.result(shared); // Finalize task & return result
})
.launch(function(errors){ // Procedure controller.
if(errors){ // Array of Errors || undefined
console.log("END[ERROR]",arguments);
} else {
console.log("END[OK]",arguments);
}
})
;
FAQs
Simple JS async develpoment, easy error handling, chained results, declarative way.
The npm package procedure receives a total of 26 weekly downloads. As such, procedure popularity was classified as not popular.
We found that procedure 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.