Default `require` function. Pass a custom function to
`opts.require` to override.

@param  {String} `name`
@param  {Object} `opts`
@return {String}
489982
function req (name, opts) {
  if (opts && opts.require) {
    return opts.require(name, opts)
  }
  var fp = require.resolve(name)
  return require(fp)
}
434291
function(name) {
    if (cache[name]) {
        return cache[name]
    } else {
        if (require) {
            return require(name)
        } else if (window.require) {
            return window.require(name)

        } else {
            throw new Error("Cannot find module " + name)
        }
    }
}
513647
function getFunction(name) {
    return new Promise((resolve, reject) => {
        lambda.getFunctionConfiguration({
            FunctionName: name
        }, function(err, data) {
            if (err) return reject(err);
            resolve(data);
        });
    });
}
951283
function(opt, field_name, default_value) {
    if(typeof field_name === 'string') {
      // case of single string
      return (typeof opt[field_name] !== 'undefined') ? opt[field_name] : default_value;
    } else {
      // assume we are given a list of string instead
      var ret = default_value;
      for(var i=0;i<field_name.length;i++) {
        var f = field_name[i];
        if (typeof opt[f] !== 'undefined') {
          ret = opt[f]; // overwrite return value
        }
      }
      return ret;
    }
  }
808869
function(inst, name) {
		return inst.settings[name] !== undefined ?
			inst.settings[name] : this._defaults[name];
	}
862066
function Plugin(opts) {
  this.namespace = opts.namespace;
  this._fns = {};
  this.util = _.clone(util);
}
84924
function perform_require(reqfunc, plugin_desc, builtin, level) {
  var search_list = plugin_desc.search
  var initfunc, search

  next_search_entry: for (var i = 0; i < search_list.length; i++) {
    search = search_list[i]

    // only load builtins if builtin flag true
    if (!builtin && 'builtin' == search.type) continue

    if (0 === level && 'builtin' != search.type && search.name.match(/^[.\/]/))
      continue

    try {
      plugin_desc.history.push({ module: reqfunc.module, path: search.name })

      initfunc = reqfunc(search.name)

      // Found it!
      break
    } catch (e) {
      if ('MODULE_NOT_FOUND' == e.code) {
        // A require failed inside the plugin.
        if (-1 == e.message.indexOf(search.name)) {
          return { error: e, found: search }
        }

        // Plain old not found, so continue searching.
        continue next_search_entry
      } else {
        // The require failed for some other reason.
        return { error: e, found: search }
      }
    }
  }

  // Return the init function, and a description of where we found it.
  return {
    initfunc: initfunc,
    module: reqfunc.module,
    require: search.name,
    found: search
  }
}
344894
function makeArrayOpt(opts, name) {
    if( !Array.isArray(opts[name]) ) {
      opts[name] = [ opts[name] ];
    }
    return opts[name];
  }
744688
function (name) {
                /**
                 * Any of the allowed functions. Arguments are shifted if params is a function so there's no need to give an empty params array.
                 * @param {Array} params optional array of parameters for the function. Treated as success callback if a function instead.
                 * @param {function} success Callback function
                 * @param {function} error   Error handler
                 */
                RPC_API[name] = function (params, success, error) {
                    if (name === 'getInfo') {
                        // hide params from external getInfo calls
                        error = success;
                        success = params;
                        params = [rpcClientVersion];
                    }

                    if (typeof params === 'function') {
                        error = success;
                        success = params;
                        params = [];
                    }

                    channel.call({
                        method: name,
                        params: params,
                        success: success,
                        error: error || defaultErrorHandler
                    });
                };
            }
1366148
function createThingme (opts) {
    opts = defaultOptions(opts);
    validateThings(opts.things);
    return createWebservice(opts);
}
715440
function createReqIdHeaders(opts) {

    assert.object(opts, 'opts');
    assert.arrayOfString(opts.headers, 'opts.headers');

    var headers = opts.headers.concat(DEFAULT_HEADERS);

    return function reqIdHeaders(req, res, next) {

        for (var i = 0; i < headers.length; i++) {
            var val = req.header(headers[i]);

            if (val) {
                req.id(val);
                break;
            }
        }

        return next();
    };
}
858372
function require(names, callback, errback, referer) {
      // in amd, first arg can be a config object... we just ignore
      if (typeof names == 'object' && !(names instanceof Array))
        return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));

      // amd require
      if (typeof names == 'string' && typeof callback == 'function')
        names = [names];
      if (names instanceof Array) {
        var dynamicRequires = [];
        for (var i = 0; i < names.length; i++)
          dynamicRequires.push(loader['import'](names[i], referer));
        Promise.all(dynamicRequires).then(function(modules) {
          if (callback)
            callback.apply(null, modules);
        }, errback);
      }

      // commonjs require
      else if (typeof names == 'string') {
        var defaultJSExtension = loader.defaultJSExtensions && names.substr(names.length - 3, 3) != '.js';
        var normalized = loader.decanonicalize(names, referer);
        if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) == '.js')
          normalized = normalized.substr(0, normalized.length - 3);
        var module = loader.get(normalized);
        if (!module)
          throw new Error('Module not already loaded loading "' + names + '" as ' + normalized + (referer ? ' from "' + referer + '".' : '.'));
        return module.__useDefault ? module['default'] : module;
      }

      else
        throw new TypeError('Invalid require');
    }
601515
function require_override(p){
  var path = require.resolve(p)
    , mod = require.modules[path];
  if (!mod) {
    var exports;
    $.ajax({ 
      type: "GET",
      url: path + '.js',   
      async: false,
      success : function(text) {
        exports = {};
        eval(text);
        require.modules[path + '.js'] = { exports: exports };
      }
    });
    if (exports != null) {
      return exports;
    }
    throw new Error('failed to require "' + p + '"');
  }
  if (!mod.exports) {
    mod.exports = {};
    mod.call(mod.exports, mod, mod.exports, require.relative(path));
  }
  return mod.exports;
}
1280353
function (opts) {

	// minimal error checking
	if (!_.isObject(opts)) {
		throw new Error('an opts obj must be passed to ReplaceText contructor');
	}
	if (!_.isString(opts.filePath)) {
		throw new Error('filePath must be a string:' + this.filePath.toString && this.filePath.toString());
	}

	this.newVersion = opts.newVersion;

	/////////////////////////////////////////////////
	// file PATH > for creating/deleting old files //
	/////////////////////////////////////////////////
	this.filePath = opts.filePath;
	this.filePathBeg = removeSuffix(this.filePath);
	this.filePathSuffix = returnSuffix(this.filePath);
	this.requireJs = (opts.requireJs === true) && (this.filePathSuffix === '.js');

	///////////////////////////////////////////////
	// file NAME > for grepping > find + replace //
	///////////////////////////////////////////////
	this.fileName = opts.filePath.split('/').pop();
	this.fileNameBeg = removeSuffix(this.fileName);
	this.fileNameSuffix = returnSuffix(this.fileName);
	this.regedFileNameSuffix = escapeRegExp(this.fileNameSuffix);
	this.regedFileNameBeg = escapeRegExp(this.fileNameBeg);
	this.cdnPath = opts.cdnPath;

	// regexes
	this.oldVersionFileNameRegex = new RegExp('(^|\/)' + this.regedFileNameBeg + '\\.[a-z0-9]+' + this.regedFileNameSuffix + '$', "ig");
	this.fileNameRegex = new RegExp('(^|\'|\")(([^\'"]*\/)?)(' + this.regedFileNameBeg + '(\\.[a-z0-9]+' + this.regedFileNameSuffix + ')|' + this.regedFileNameBeg + '(' + this.regedFileNameSuffix + '))', "ig");
	// this.fileNameRegexRequireJs = new RegExp(this.regedFileNameBeg + '\\.[a-z0-9]+(?!' + this.regedFileNameSuffix + ')(?!=)|' + this.regedFileNameBeg + '(?!' + this.regedFileNameSuffix + ')(?!=)', "ig");
	this.fileNameRegexRequireJs = new RegExp(this.regedFileNameBeg + '\\.[a-z0-9]+(?!' + this.regedFileNameSuffix + ')(?!=)("|\')|' + this.regedFileNameBeg + '(?!' + this.regedFileNameSuffix + ')(?!=)("|\')', "ig");

	return _(this).bindAll('assignNewVersion', 'addOutputFileAttrs', 'run');
}
1227451
private function blockNameTrans($name, $block, &$opts)
	{
		$this->debug->groupCollapsed(__CLASS__.'->'.__FUNCTION__);
		$func = $opts['name_trans_func'][0];
		$params = array_slice($opts['name_trans_func'], 1);
		$strObj = new Str();
		if (!isset($opts['trans_func_params_sub'])) {
			$opts['trans_func_params_sub'] = array();
			foreach ($params as $k => $v) {
				$params[$k] = $strObj->quickTemp($v, $block);
				if ($params[$k] != $v) {
					$opts['trans_func_params_sub'][] = $k;
				}
			}
		} else {
			foreach ($opts['trans_func_params_sub'] as $k) {
				$params[$k] = $strObj->quickTemp($params[$k], $block);
			}
		}
		$name_new = call_user_func_array($func, $params);
		$this->debug->groupEnd();
		return $name_new;
	}
488518
function (name) {
            if ((name == "deep-freeze" || name == "deep-freeze-strict") && root.deepFreeze) {
                return root.deepFreeze;
            }

            if (name == "lodash" && root._) {
                return root._;
            }

            if (name == "immutable" && root.Immutable) {
                return root.Immutable;
            }

            if (name.indexOf("iassign") > -1 && root.iassign) {
                return root.iassign;
            }

            throw new Error("Unable to require: " + name);
        }
507029
function(name, data) {
      return {
        name: null,
        task: null,
        weight: 0,
        inquire: null,
        conf: {
          type: 'pluginconfig',
          key: data.option.name || null,
          plugin: name
        }
      };
    }