MCPcopy
hub / github.com/reapp/reapp / moduleExists

Function moduleExists

lib/findConfig.js:5–12  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

3require('reapp-object-assign');
4
5function moduleExists(path) {
6 try {
7 require.resolve(path);
8 return true;
9 } catch (e) {
10 return false;
11 }
12}
13
14function requireFirst(paths, getDefault) {
15 if (typeof getDefault === 'undefined') {

Callers 1

requireFirstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected