1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/import-from/index.js

13 lines
286 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
'use strict';
const resolveFrom = require('resolve-from');
module.exports = (fromDir, moduleId) => require(resolveFrom(fromDir, moduleId));
module.exports.silent = (fromDir, moduleId) => {
try {
return require(resolveFrom(fromDir, moduleId));
} catch (err) {
return null;
}
};