
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Some useful tools for nodejs development
Some tools are from https://github.com/wyicwx/mutils
##Usage
var gear = require('gear');
var _ = gear._;//underscore
//watch object`s change
var listenid = gear.listen.add({}, function(data){//add watch
//do something
});
gear.listen.set(listenid, {a:1});//set object, and will trigger callback function of 'add'
gear.jsonsize(jsonobj);//calculate the length of a simple json object
gear.fs.mkdir('a/b/c', './');//make dir ./a/b/c
gear.fs.readFile('test.js').done(function(data){//read local file
//content of test.js
});
gear.fs.readFile('http://test.com/test.js').done(function(data){//read net file
//content of test.js
});
gear.fs.copyFile(file, tarDir, [
{ match : '@', replacement : '-', isreg:false}
]).done(function(src){
});
gear.fs.clearDirSync('a', function(){//remove all files from 'a' directory
//do something
});
//Sequential execution in nodejs
var c = gear.connect();
c.use(function(data, next, done) {
//coding1
next(data); //pass to next function
});
c.use(function(data, next, done) {
//coding2
done(data); //stop pass and trigger to fire
});
c.fire();
FAQs
utils for nodejs
We found that gearjs 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.