MCPcopy Create free account
hub / github.com/Kong/insomnia / isModuleInstalled

Function isModuleInstalled

packages/insomnia/scripts/verify-bundle-plugins.ts:3–10  ·  view source on GitHub ↗
(moduleName: string)

Source from the content-addressed store, hash-verified

1import { bundlePlugins } from '../config/config.json';
2
3const isModuleInstalled = (moduleName: string) => {
4 try {
5 require.resolve(moduleName);
6 return true;
7 } catch {
8 return false;
9 }
10};
11
12export const verifyBundlePlugins = () => {
13 const executeInGithubActions = process.env.GITHUB_ACTIONS === 'true';

Callers 1

verifyBundlePluginsFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected