Replacement for the loader for istanbul.
19542
function istanbulLoader(m, filename, old) {
  istanbulMonkey[filename] = true;
  old(m, filename);
}
867132
function load(module) {
    var toTransform,
		transformedModule = {};

    if (typeof module === "string") {
        toTransform = require(module);
    } else {
        toTransform = module;
    }

    for (var item in toTransform) {
        // transform only sync/async methods to promiseable since having utility methods also promiseable
        // could do more harm than good.
        if (typeof toTransform[item] === "function" && isFunctionPromiseable( toTransform, item, toTransform[item] )) {
            transformedModule[item] = rebuildAsPromise( toTransform, item, toTransform[item] );
        } else {
			transformedModule[item] = toTransform[item];
		}
    }

    return transformedModule;
}
1124255
def load(self, size):
        """"""
        if self.exists() and self.isfile():
            return eval(open(self).read(size))
530314
function getRequire(context, options, tag, type, resource) {
    const loaders = normalizeLoaders(options.map[type]);
    const selectLoader = require.resolve('./loader.js');
    const request = {
        tag,
        type,
        options
    };
    const url = loaderUtils.stringifyRequest(context, `!${loaders}!${selectLoader}?${JSON.stringify(request)}!${resource}`)
    const prefix = tag === 'script' ? 'module.exports = ' : 'const $style = ';
    return `${prefix}require(${url});\r\n`;
}
1223616
function Loader(options) {
  if (!(this instanceof Loader)) {
    return new Loader(options);
  }
  this.options = options || {};
  this.cache = this.options.helpers || {};
}
1080234
def loader():
    """"""
    url = request.args.get('url')  # read image URL as a request URL param
    response = requests.get(url)  # make request to static image file
    return response.content
361602
function (app) {
  let p = pathUtil.getCronPath(app.getBase(), app.getServerType());
  if (p) {
    return Loader.load(p, app);
  }
}
1086305
def _dyn_loader(self, module: str, kwargs: str):
        """"""
        package_directory: str = os.path.dirname(os.path.abspath(__file__))
        modules: str = package_directory + "/modules"
        module = module + ".py"
        if module not in os.listdir(modules):
            raise Exception("Module %s is not valid" % module)
        module_name: str = module[:-3]
        import_path: str = "%s.%s" % (self.MODULE_PATH, module_name)
        imported = import_module(import_path)
        obj = getattr(imported, 'Module')
        return obj(**kwargs)
1128320
function loader(content, sourceMap) {
  /* jshint validthis:true */

  // loader result is cacheable
  this.cacheable();

  // path of the file being processed
  var filename = path.relative(this.options.context || process.cwd(), this.resourcePath).replace(/\\/g, '/'),
      options  = loaderUtils.parseQuery(this.query),
      useMap   = loader.sourceMap || options.sourceMap;

  // make sure the AST has the data from the original source map
  var pending = migrate.processSync(content, {
    filename : filename,
    sourceMap: useMap && (sourceMap || true),
    quoteChar: options.singleQuote ? '\'' : '"'
  });

  // emit deprecation warning
  if ((pending.isChanged) && (options.deprecate)) {
    var text = '  ' + PACKAGE_NAME + ': @ngInject doctag is deprecated, use "ngInject" string directive instead';
    this.emitWarning(text);
  }

  // emit errors
  if (pending.errors.length) {
    var text = pending.errors.map(indent).join('\n');
    this.emitError(text);
  }

  // complete
  if (useMap) {
    this.callback(null, pending.content, pending.sourceMap);
  } else {
    return pending.content;
  }
}
1303531
def loadb(b):
    """"""
    assert isinstance(b, (bytes, bytearray))
    return std_json.loads(b.decode('utf-8'))
1023105
function addAtLoaderShim(data) {
	if (includesAtLoader(omit(data.graph, data.loader.configMain))) {
		winston.warn(
			colors.yellow(
				`the @loader module is not fully supported in optimized builds`
			)
		);

		var config = clone(
			omit(data.loader.__loaderConfig, ["paths", "stealPath"])
		);

		// make sure the "window-production" config overrides previous values
		assign(config, defaultTo(config.envs, {})["window-production"]);

		data.graph["@loader"] = makeShimNode(data.loader.main, config);
	}

	return data;
}
192937
def choice_default_loader(self, pk):
        """"""
        try:
            obj = Choice.objects.get(pk=pk)
        except Choice.DoesNotExist:
            return None
        else:
            self.choice_default_add_related_pks(obj)
            return obj
30374
def replace_type(items, spec, loader, found, find_embeds=True, deepen=True):
    # type: (Any, Dict[Text, Any], Loader, Set[Text], bool, bool) -> Any
    

    if isinstance(items, MutableMapping):
        # recursively check these fields for types to replace
        if items.get("type") in ("record", "enum") and items.get("name"):
            if items["name"] in found:
                return items["name"]
            found.add(items["name"])

        if not deepen:
            return items

        items = copy.copy(items)
        if not items.get("name"):
            items["name"] = get_anon_name(items)
        for name in ("type", "items", "fields"):
            if name in items:
                items[name] = replace_type(
                    items[name], spec, loader, found, find_embeds=find_embeds,
                    deepen=find_embeds)
                if isinstance(items[name], MutableSequence):
                    items[name] = flatten(items[name])

        return items
    if isinstance(items, MutableSequence):
        # recursively transform list
        return [replace_type(i, spec, loader, found, find_embeds=find_embeds,
                             deepen=deepen) for i in items]
    if isinstance(items, string_types):
        # found a string which is a symbol corresponding to a type.
        replace_with = None
        if items in loader.vocab:
            # If it's a vocabulary term, first expand it to its fully qualified
            # URI
            items = loader.vocab[items]

        if items in spec:
            # Look up in specialization map
            replace_with = spec[items]

        if replace_with:
            return replace_type(replace_with, spec, loader, found, find_embeds=find_embeds)
        found.add(items)
    return items
839049
function loadWasm(name, req, load) {
  req(['raw!' + name], response => {
    response.arrayBuffer().then(buffer =>
      WebAssembly.instantiate(buffer, /*importObject*/)
    )
    .then(
      obj => {
        load(obj.instance.exports);
      },
      load.error
    );
  });
}
599257
def loader(path):
    
    finder = ModuleFinder if _isdir(path) else FileFinder
    return Loader(finder(path))
181898
def fileserver(opts, backends):
    '''
    
    '''
    return LazyLoader(_module_dirs(opts, 'fileserver'),
                      opts,
                      tag='fileserver',
                      whitelist=backends,
                      pack={'__utils__': utils(opts)})
777760
def load_roller_shutter(self, item):
        """"""
        rollershutter = RollerShutter.from_config(self.pyvlx, item)
        self.add(rollershutter)