New site:
Please visit the link above for up-to-date content.
The rest of the page is left here for legacy reasons but will no longer be updated.
New site:
Please visit the link above for up-to-date content.
The rest of the page is left here for legacy reasons but will no longer be updated.
This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:
(async main(){...}())
as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problemsI'll leave the rest of this document unedited, for archaeological
var npm = require('npm'); | |
npm.load(function(err, npm){ | |
npm.config.set('loglevel', 'silent'); | |
npm.commands.show(['npm'], function(err, result){ /* not using any result on purpose*/}); | |
console.log(npm.config.get('loglevel')); // this is printing 'silent' | |
}); |