Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 485B

12345678910111213141516171819
  1. 'use strict';
  2. var path = require('path');
  3. var Module = require('module');
  4. module.exports = function (fromDir, moduleId) {
  5. if (typeof fromDir !== 'string' || typeof moduleId !== 'string') {
  6. throw new TypeError('Expected `fromDir` and `moduleId` to be a string');
  7. }
  8. fromDir = path.resolve(fromDir);
  9. var fromFile = path.join(fromDir, 'noop.js');
  10. return Module._resolveFilename(moduleId, {
  11. id: fromFile,
  12. filename: fromFile,
  13. paths: Module._nodeModulePaths(fromDir)
  14. });
  15. };