Retrieves the options from the loaderContext, makes a deep copy of it and normalizes it for further consumption.

@param {LoaderContext} loaderContext
320254
function getOptions(loaderContext) {
  const options = {
    plugins: [],
    relativeUrls: true,
    ...clone(loaderUtils.getOptions(loaderContext)),
  };

  // We need to set the filename because otherwise our WebpackFileManager will receive an undefined path for the entry
  options.filename = loaderContext.resource;

  // When no paths are given, we use the webpack resolver
  if ('paths' in options === false) {
    // It's safe to mutate the array now because it has already been cloned
    options.plugins.push(createWebpackLessPlugin(loaderContext));
  }

  if (options.sourceMap) {
    if (typeof options.sourceMap === 'boolean') {
      options.sourceMap = {};
    }
    if ('outputSourceFiles' in options.sourceMap === false) {
      // Include source files as `sourceContents` as sane default since this makes source maps "just work" in most cases
      options.sourceMap.outputSourceFiles = true;
    }
  }

  return options;
}
1238616
function(editorContext, options) {
			var that = this;
			var deferred = new Deferred();
			editorContext.getFileMetadata().then(function(metadata) {
				if(Array.isArray(metadata.parents) && metadata.parents.length > 1) {
					that.scriptResolver.setSearchLocation(metadata.parents[metadata.parents.length - 1].Location);
				} else {
					that.scriptResolver.setSearchLocation(null);	
				}
	    		return that._doRename(editorContext, options, deferred);
			}, /* @callback */ function(err) {
				deferred.reject({Severity: 'Error', Message: Messages['noFileMeta']}); //$NON-NLS-1$
			});
			return deferred;
		}
365651
function(options) {
    if (config.sourcemaps) {
        options = _.defaults(
            options,
            { devtool: '#source-map' }
        );
    }

    if (config.production) {
        var currPlugins = _.isArray(options.plugins) ? options.plugins : [];
        options.plugins = currPlugins.concat([new UglifyJsPlugin({ sourceMap: false })]);
    }

    return options;
}
1057623
function(context) {
    var maskedContext = this._maskContext(context);
    if ("production" !== "development") {
      var Component = ReactNativeComponent.getComponentClassForElement(
        this._currentElement
      );
      if (Component.contextTypes) {
        this._checkPropTypes(
          Component.contextTypes,
          maskedContext,
          ReactPropTypeLocations.context
        );
      }
    }
    return maskedContext;
  }
1334659
function(helpers, options) {
      if (typeof helpers === 'object') {
        this.visit('helper', helpers);
        return this;
      }

      if (lazy.isGlob(helpers)) {
        this.loader('helpers-glob', ['base-glob'], function (files) {
          return files.map(function (fp) {
            return require(path.resolve(fp));
          });
        });

        var res = this.compose('helpers-glob')(helpers, options);
        this.visit('helper', res);
        return this;
      }

      if (typeof helpers === 'string') {
        console.log('loading helpers from a string is not implemented yet.');
      }
      return this;
    }
1018176
function getDockerfileContext(context) {
  const fs = require('fs');
  let files = [];
  let dockerfile = exports.resolveDockerfile(context);
  let file = fs.readFileSync(dockerfile, {encoding: 'utf8'});
  for (let line of file.split('\n')) {
    if (line.match(/^\s*(ADD|COPY).*$/)) {
      let entries = line.split(' ')
        .splice(1)
        .map(val => val.trim())
        .filter(val => val !== '')
        .filter(val => !val.startsWith('http'));
      if (entries[0].startsWith('--chown')) {
        entries = entries.splice(1);
      }

      // Array mode
      if (line.indexOf('[') !== -1 && line.indexOf(']') !== -1) {
        let args = JSON.parse(entries.join(' '));
        args.splice(-1);
        files = args
      }
      // Default mode
      else {
        entries.splice(-1);
        files = entries;
      }
    }
  }

  let resolvedFiles = [];
  for (let file of files) {
    resolvedFiles = resolvedFiles.concat(glob.sync(path.join(path.dirname(context), file)));
  }

  return { context, src: ['Dockerfile', ...resolvedFiles] };
}
205996
function (context) {
    var maskedContext = this._maskContext(context);
    if ("development" !== 'production') {
      var Component = this._currentElement.type;
      if (Component.contextTypes) {
        this._checkContextTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context);
      }
    }
    return maskedContext;
  }
173650
function (sContext) {
			var oContext;

			if (this.getContext) {
				oContext = this.getContext();
			} else {
				oContext = mContexts;
			}

			var oOptions = oContext[sContext];

			if (!oOptions) {
				Log.error("The context " + sContext + " is not known", this);

				return null;
			}

			return oOptions;
		}
677737
function normalize(options, opts) {
  opts = opts || {};

  const rawOptions = Object.assign({}, options);

  const supportOptions = getSupportInfo(null, {
    plugins: options.plugins,
    showUnreleased: true,
    showDeprecated: true
  }).options;
  const defaults = supportOptions.reduce(
    (reduced, optionInfo) =>
      optionInfo.default !== undefined
        ? Object.assign(reduced, { [optionInfo.name]: optionInfo.default })
        : reduced,
    Object.assign({}, hiddenDefaults)
  );

  if (!rawOptions.parser) {
    if (!rawOptions.filepath) {
      const logger = opts.logger || console;
      logger.warn(
        "No parser and no filepath given, using 'babel' the parser now " +
          "but this will throw an error in the future. " +
          "Please specify a parser or a filepath so one can be inferred."
      );
      rawOptions.parser = "babel";
    } else {
      rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins);
      if (!rawOptions.parser) {
        throw new UndefinedParserError(
          `No parser could be inferred for file: ${rawOptions.filepath}`
        );
      }
    }
  }

  const parser = resolveParser(
    normalizer.normalizeApiOptions(
      rawOptions,
      [supportOptions.find(x => x.name === "parser")],
      { passThrough: true, logger: false }
    )
  );
  rawOptions.astFormat = parser.astFormat;
  rawOptions.locEnd = parser.locEnd;
  rawOptions.locStart = parser.locStart;

  const plugin = getPlugin(rawOptions);
  rawOptions.printer = plugin.printers[rawOptions.astFormat];

  const pluginDefaults = supportOptions
    .filter(
      optionInfo =>
        optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name]
    )
    .reduce(
      (reduced, optionInfo) =>
        Object.assign(reduced, {
          [optionInfo.name]: optionInfo.pluginDefaults[plugin.name]
        }),
      {}
    );

  const mixedDefaults = Object.assign({}, defaults, pluginDefaults);

  Object.keys(mixedDefaults).forEach(k => {
    if (rawOptions[k] == null) {
      rawOptions[k] = mixedDefaults[k];
    }
  });

  if (rawOptions.parser === "json") {
    rawOptions.trailingComma = "none";
  }

  return normalizer.normalizeApiOptions(
    rawOptions,
    supportOptions,
    Object.assign({ passThrough: Object.keys(hiddenDefaults) }, opts)
  );
}
1222142
function normalize(loader, mods) {
	var modNames = (mods && !Array.isArray(mods)) ? [mods] : mods;

	return (modNames || []).map(function(moduleName) {
		return !_.isString(moduleName) ?
			Promise.resolve(moduleName) :
			loader.normalize(moduleName);
	});
}
531643
public ConfigParseOptions setClassLoader(ClassLoader loader) {
        if (this.classLoader == loader)
            return this;
        else
            return new ConfigParseOptions(this.syntax, this.originDescription, this.allowMissing,
                    this.includer, loader);
    }
827088
function getTypeFromContext (context) {
  if (!context.method.returns) return undefined

  const returns = [].concat(context.method.returns)
  for (var i = 0, l = returns.length; i < l; i++) {
    if (typeof returns[i] !== 'object' || returns[i].root !== true) continue
    return returns[i].type
  }
}
93368
function _importDirectoryOptionsParser(options={}) {
  const _options = Object.assign({
    imports: {},
    onload: options.callback,
    extension: makeArray(options.extensions || settings.get('extensions')),
    useSyncRequire: settings.get('useSyncRequire'),
    merge: settings.get('mergeImports'),
    rescursive: false
  }, options, {
    squashErrors: !!options.retry
  });

  if (_options.extensions) delete _options.extensions;

  if (options.callback) console.warn(`The options.callback method is deprecated, please use options.onload() instead. This being used in ${getCallingFileName()}`);

  return _options;
}
681748
function loadConfig(opts) {
  if (opts != null && (typeof opts === "undefined" ? "undefined" : (0, _typeof3.default)(opts)) !== "object") {
    throw new Error("Babel options must be an object, null, or undefined");
  }

  return (0, _optionManager2.default)(opts || {});
}
1173675
function (res, cfg) {
                var providerInstance = providerInstances[cfg.provider];
                providerInstance.load({
                    fn : this._retrieveMapInstance,
                    scope : this,
                    args : cfg
                });
            }
384427
function(pluginName, defaultOptions) {
		
		var self = this,
			options = $.extend(true, {}, defaultOptions);
		
		// if the plugin options were isolated in a property named after the
		// plugin, use them (prevents conflicts with other plugins)
		var pluginOptions = self.__options[pluginName];
		
		// if not, try to get them as regular options
		if (!pluginOptions){
			
			pluginOptions = {};
			
			$.each(defaultOptions, function(optionName, value) {
				
				var o = self.__options[optionName];
				
				if (o !== undefined) {
					pluginOptions[optionName] = o;
				}
			});
		}
		
		// let's merge the default options and the ones that were provided. We'd want
		// to do a deep copy but not let jQuery merge arrays, so we'll do a shallow
		// extend on two levels, that will be enough if options are not more than 1
		// level deep
		$.each(options, function(optionName, value) {
			
			if (pluginOptions[optionName] !== undefined) {
				
				if ((		typeof value == 'object'
						&&	!(value instanceof Array)
						&&	value != null
					)
					&&
					(		typeof pluginOptions[optionName] == 'object'
						&&	!(pluginOptions[optionName] instanceof Array)
						&&	pluginOptions[optionName] != null
					)
				) {
					$.extend(options[optionName], pluginOptions[optionName]);
				}
				else {
					options[optionName] = pluginOptions[optionName];
				}
			}
		});
		
		return options;
	}
1206116
function getLoader (location) {
  var scheme = getScheme(location);
  var loader = supportedLoaders[scheme];

  if (typeof loader === 'undefined') {
    if (scheme === '') {
      loader = defaultLoader;
    } else {
      throw new Error('Unsupported scheme: ' + scheme);
    }
  }

  return loader;
}