Get the package which current module belongs to.
@return {KISSY.Loader.Package}
184088
function () {
            var self = this;
            if (!('packageInfo' in self)) {
                var name = self.name;
                // absolute path
                if (startsWith(name, '/') ||
                    startsWith(name, 'http://') ||
                    startsWith(name, 'https://') ||
                    startsWith(name, 'file://')) {
                    self.packageInfo = null;
                    return;
                }
                var packages = Config.packages,
                    modNameSlash = self.name + '/',
                    pName = '',
                    p;
                for (p in packages) {
                    if (startsWith(modNameSlash, p + '/') && p.length > pName.length) {
                        pName = p;
                    }
                }
                self.packageInfo = packages[pName] || packages.core;
            }
            return self.packageInfo;
        }
563690
function(key) {
        if (!this._loader.modules[key])
          return;
        doEnsureEvaluated(this._loader.modules[key], [], this);
        return this._loader.modules[key].module;
      }
685501
private function getPackage()
    {
        $reflection = new ReflectionClass(get_called_class());
        return app(FilesystemFinder::class)->resolveNamespace($reflection->getFileName(), true);
    }
202856
function getNPM() {
    Object.keys(require.cache).forEach(function (key) {
        delete require.cache[key];
    });
    var NPM = require('npm');
    return NPM;
}
927931
function(){
		var pkg = utils.extend({}, this.orig);

		var isFlat = this.context.isFlatFileStructure;
		var fileUrl = this.pkg.fileUrl;
		var context = this.context;

		if(isFlat && !pkg.__crawledNestedPosition) {
			pkg.__crawledNestedPosition = true;
			pkg.nextFileUrl = pkg.nestedFileUrl;
		}
		else {
			// make sure we aren't loading something we've already loaded
			var parentAddress = utils.path.parentNodeModuleAddress(fileUrl);
			if(!parentAddress) {
				throw new Error('Did not find ' + pkg.origFileUrl);
			}
			var nodeModuleAddress = parentAddress + "/" + pkg.name +
				"/package.json";

			pkg.nextFileUrl = nodeModuleAddress;
		}

		return pkg;
	}
257539
function getNodeModulesToInstall(dependencies) {
    const modules = [];
    for (const module in dependencies) {
      if (dependencies.hasOwnProperty(module)) {
        try {
          require(module);
        } catch (err) {
          modules.push(module);
        }
      }
    }
    return modules;
  }
365102
function() {
    return this._findInRepoAddons().reduce((acc, addon) => {
      let addonDir = path.join(this.project.root, 'lib', addon.name);
      let addonAppDir = path.join(addonDir, 'app');
      let addonAddonDir = path.join(addonDir, 'addon');
      const addonAddonTestSupportDir = path.join(addonDir, 'addon-test-support');
      return concat(
        acc,
        this._getIncludesForDir(addonAppDir, this.parent.name()),
        this._getIncludesForDir(addonAddonDir, addon.name),
        this._getIncludesForDir(addonAddonTestSupportDir, `${addon.name}/test-support`)
      );
    }, []);
  }
1355895
function() {
        var basePath = window.location.pathname;
        basePath = basePath.substring(0, basePath.lastIndexOf('/')+1);
        return basePath+"packages/"+this.get("name");
    }
619923
function() {
    const packages = [
      {
        name: 'ember-auto-import',
        target: getDependencyVersion(pkg, 'ember-auto-import'),
      },
      {
        name: 'react',
        target: getPeerDependencyVersion(pkg, 'react'),
      },
      {
        name: 'react-dom',
        target: getPeerDependencyVersion(pkg, 'react-dom'),
      },
    ];
    return this.addPackagesToProject(packages);
  }
648524
function(module) {
		var name = module.$modname;
		if (!this.$hasModule(name)) {
			this._modules.push(module);
			if (gui.Type.isFunction(module.oncontextinitialize)) {
				module.oncontextinitialize(window);
			}
			if (gui.Type.isFunction(module.onrun)) {
				module.onrun();
			}
		} else {
			throw new Error(name + ' loaded twice?');
		}
		return module;
	}
488775
function getModule(name, loader) {
    var exports;
    var entry = loader.defined[name];

    if (!entry) {
      exports = loader.get(name);
      if (!exports)
        throw new Error('Unable to load dependency ' + name + '.');
    }

    else {
      if (entry.declarative)
        ensureEvaluated(name, entry, [], loader);
    
      else if (!entry.evaluated)
        linkDynamicModule(entry, loader);

      exports = entry.module.exports;
    }

    if ((!entry || entry.declarative) && exports && exports.__useDefault)
      return exports['default'];
    
    return exports;
  }
488419
function getBundle(entry, cfg) {
  return getPackage(entry).then(function (data) {

    var entry = path.dirname(data.path);
    var pkg = data.pkg;
    var titaniumManifest = pkg.titaniumManifest || {};

    var moduleid = titaniumManifest.moduleid || pkg.name;

    var opts = pkg.titaniumifier || pkg.npmifier || pkg.browserify || {};

    opts.extensions || (opts.extensions = [ '.js', '.json' ]);
    opts.transforms || (opts.transforms = []);
    opts.ignores || (opts.ignores = []);
    opts.externals || (opts.externals = []);

    var addExternals = addDeps.bind(null, opts.externals);

    addExternals(pkg.peerDependencies);
    addExternals(pkg.nativeDependencies);

    if (cfg.noDependencies) {
      addExternals(pkg.dependencies);
      addExternals(pkg.devDependencies);
      addExternals(pkg.optionalDependencies);
    }

    opts.ignoreMissing = !!opts.ignoreMissing;

    var b = browserify({
      basedir: entry,
      builtins: BUILTINS,
      debug: cfg.debug,
      extensions: opts.extensions,
      externalRequireName: cfg.exportRequire ? 'module.exports' : undefined,
      insertGlobalVars: GLOBAL_VARS,
      ignoreMissing: false,
      standalone: (cfg.standalone === false) ? undefined : moduleid,
      prelude: PRELUDE_SRC,
      preludePath: PRELUDE_PATH
    });

    b.plugin(fixResolver, {
      resolve: titaniumResolve
    });

    if (Array.isArray(opts.transforms)) {
      opts.transforms.forEach(function (transform) {
        b.transform(transform);
      });
    }
    else {
      Object.keys(opts.transforms).forEach(function (transform) {
        b.transform(transform, opts.transforms[ transform ]);
      });
    }

    opts.ignores.forEach(function (ignore) {
      b.ignore(ignore);
    });

    opts.externals.forEach(function (external) {
      b.exclude(external);
    });

    if (cfg.useTitaniumPlatformResolve) {
      TODO;
      /*b.transform(titaniumPlatformResolve.createTransform({
        platforms: [ build.platformName ],
        extensions: opts.extensions
      }));*/
    }

    return {
      entry: entry,
      pkg: pkg,
      opts: opts,
      bundle: b
    };
  });
}
365961
function getPackageRoot (dir) {
    let lastDir = null;
    while (lastDir !== dir && !fs.existsSync(path.resolve(dir, "./package.json"))) {
        lastDir = dir;
        dir = path.dirname(dir);
    }
    return (lastDir === dir ? null : dir);
}
1193028
function getClosestPackage(modulePath) {
  let root;
  let pkg;

  // Catch findRoot or require errors
  try {
    root = findRoot(modulePath);
    pkg = require(path.join(root, "package.json"));
  } catch (e) {
    return null;
  }

  // If the package.json does not have a name property, try again from
  // one level higher.
  // https://github.com/jsdnxx/find-root/issues/2
  // https://github.com/date-fns/date-fns/issues/264#issuecomment-265128399
  if (!pkg.name) {
    return getClosestPackage(path.resolve(root, ".."));
  }

  return {
    package: pkg,
    path: root
  };
}
204510
public Package loadPackage(Module lastModule, String l) {
        Package p = Package.load(lastModule, l);
        lastModule.addPackage(p);
        packages.put(p.name(), p);
        return p;
    }
1255346
function loadModules() {
  const nodeModulesPath = path.join(process.cwd(), plugin.config.modulesPath);

  return plugin.myrmex.fire('beforeNodeModulesLoad')
  .then(() => {
    // Retrieve paths of all node packages
    return Promise.promisify(fs.readdir)(nodeModulesPath);
  })
  .then(subdirs => {
    // Load all packages configurations
    const nodeModulePromises = [];
    _.forEach(subdirs, (subdir) => {
      const nodeModulePath = path.join(nodeModulesPath, subdir);
      // subdir is the name of the package, so we pass it as the second argument
      nodeModulePromises.push(loadNodeModule(nodeModulePath, subdir));
    });
    return Promise.all(nodeModulePromises);
  })
  .then(nodeModules => {
    // This event allows to inject code to add or delete or alter node modules configurations
    return plugin.myrmex.fire('afterNodeModulesLoad', nodeModules);
  })
  .spread(nodeModules => {
    return Promise.resolve(nodeModules);
  })
  .catch(e => {
    // In case the project does not have any node package yet, an exception will be thrown
    // We silently ignore it
    if (e.code === 'ENOENT' && path.basename(e.path) === 'modules') {
      return Promise.resolve([]);
    }
    return Promise.reject(e);
  });
}
449600
function getModule(moduleName) {
                    try {
                        return ngModuleFct(moduleName);
                    } catch (e) {
                        // this error message really suxx
                        if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {
                            e.message = 'The module "' + stringify(moduleName) + '" that you are trying to load does not exist. ' + e.message;
                        }
                        throw e;
                    }
                }