XeNote/.yarn/unplugged/@ampproject-toolbox-optimizer-virtual-871245ee15/node_modules/@ampproject/toolbox-optimizer/lib/isDependencyInstalled.js
canburaks b23e3ff508 ...
2021-05-17 04:16:19 +03:00

10 lines
185 B
JavaScript

function isDependencyInstalled(dependency) {
try {
require.resolve(dependency);
return true;
} catch (err) {
return false;
}
}
module.exports = isDependencyInstalled;