config/ngModuleData.js
function buildScanner(pattern) {

  return function findPatternIn(content) {
    let dependencies;
    const match = pattern.exec(content || '');
    const moduleName = match ? match[1].replace(/'/gi,'') : null;
    const depsMatch = match && match[2] && match[2].trim();

    if (depsMatch) {
      dependencies = depsMatch.split(/\s*,\s*/).map(function(dep) {
        dep = dep.trim().slice(1, -1); // remove quotes
        return dep;
      });
    }

    return match ? {
      name         : moduleName || '',
      module       : moduleName || '',
      dependencies : dependencies || []
    } : null;
  };
}
function buildScanner(pattern) {

  return function findPatternIn(content) {
    let dependencies;
    const match = pattern.exec(content || '');
    const moduleName = match ? match[1].replace(/'/gi,'') : null;
    const depsMatch = match && match[2] && match[2].trim();

    if (depsMatch) {
      dependencies = depsMatch.split(/\s*,\s*/).map(function(dep) {
        dep = dep.trim().slice(1, -1); // remove quotes
        return dep;
      });
    }

    return match ? {
      name         : moduleName || '',
      module       : moduleName || '',
      dependencies : dependencies || []
    } : null;
  };
}
function buildScanner ( pattern ) { return function findPatternIn ( content ) { let dependencies ; const match = pattern . exec ( content || '' ) ; const moduleName = match ? match [ 1 ] . replace ( / ' / gi , '' ) : null ; const depsMatch = match && match [ 2 ] && match [ 2 ] . trim ( ) ; if ( depsMatch ) { dependencies = depsMatch . split ( / \s*,\s* / ) . map ( function ( dep ) { dep = dep . trim ( ) . slice ( 1 , - 1 ) ; // remove quotes return dep ; } ) ; } return match ? { name : moduleName || '' , module : moduleName || '' , dependencies : dependencies || [ ] } : null ; } ; }
Find module definition s that match the module definition pattern
Find module definition s that match the module definition pattern