lib/config/dependencies.js
function find(id) {
  let filepath = '';

  if ('string' == typeof id) {
    try {
      // Resolve relative to buddy package
      filepath = require.resolve(id);
    } catch (err) {
      // Resolve relative to project package
      filepath = resolve(path.resolve('package.json'), id);
    }
  }

  return filepath;
}
function find(id) {
  let filepath = '';

  if ('string' == typeof id) {
    try {
      // Resolve relative to buddy package
      filepath = require.resolve(id);
    } catch (err) {
      // Resolve relative to project package
      filepath = resolve(path.resolve('package.json'), id);
    }
  }

  return filepath;
}
function find ( id ) { let filepath = '' ; if ( 'string' == typeof id ) { try { // Resolve relative to buddy package filepath = require . resolve ( id ) ; } catch ( err ) { // Resolve relative to project package filepath = resolve ( path . resolve ( 'package.json' ) , id ) ; } } return filepath ; }
Resolve dependency filepath from 'id'
@param {String} id
@returns {String}
Resolve dependency filepath from id