I'm write a node.js application. this application depend on another package, assume AAA.. so in "dependencies" of package.json should include it (above AAA)
my problem is: i want to check if user has installed AAA and use it, otherwise use AAA which my application install.
pseudolanguage:
import AAA as myAAA from 'AAA';
let fallback
if (user has been installed AAA){
fallback = AAA;
} else {
fallback = myAAA;
}
can i do that?