Load the resource

@param {String} name Resource name
@return {Promise<*>} Resolved with the resource result
@since 0.2.2
493746
function _gpfRequireLoad (name) {
    var me = this;
    return _gpfLoadOrPreload(me, name)
        .then(function (content) {
            return me.preprocess({
                name: name,
                content: content,
                type: _gpfPathExtension(name).toLowerCase()
            });
        })
        .then(function (resource) {
            return _gpfLoadGetProcessor(resource).call(me, resource.name, resource.content);
        });
}
790246
function() {
  return Promise.resolve()
  .then(function() { return npm.loadAsync(); })
  .then(function(npm) {
    npm.config.set('spin', false);
    npm.config.set('global', true);
    npm.config.set('depth', 0);
    return Promise.promisify(npm.commands.list)([], true);
  })
  .then(function(data) { return data; });
}
158272
function (name) {
        const {app, proxy} = getAppByName(name);

        // Check for an activate() method on the app.
        if (!_.isFunction(app.activate)) {
            return Promise.reject(new Error(common.i18n.t('errors.apps.noActivateMethodLoadingApp.error', {name: name})));
        }

        // Wrapping the activate() with a when because it's possible
        // to not return a promise from it.
        return Promise.resolve(app.activate(proxy)).return(app);
    }
1233775
async function query (name) {
  const o = await this.getName(name)
  const nameId = o.id

  return Object.freeze(Object.assign(o, {
    pointers: o.pointers || {},
    update: async (target, options) => {
      return {
        ...(await this.aensUpdate(nameId, target, options)),
        ...(await this.aensQuery(name))
      }
    },
    transfer: async (account, options) => {
      return {
        ...(await this.aensTransfer(nameId, account, options)),
        ...(await this.aensQuery(name))
      }
    },
    revoke: async (options) => this.aensRevoke(nameId, options)
  }))
}
258591
function(name) {
    name = name || '';

    var state = null;

    // Only use valid state queries
    if(!_validateStateName(name)) {
      return null;
    
    // Use cache if exists
    } else if(_stateCache[name]) {
      return _stateCache[name];
    }

    var nameChain = _getNameChain(name);
    var stateChain = nameChain
      .map(function(name, i) {
        var item = angular.copy(_stateLibrary[name]);
        return item;
      })
      .filter(function(parent) {
        return !!parent;
      });

    // Walk up checking inheritance
    for(var i=stateChain.length-1; i>=0; i--) {
      if(stateChain[i]) {
        var nextState = stateChain[i];
        state = angular.merge(nextState, state || {});
      }

      if(state && state.inherit === false) break;
    }

    // Store in cache
    _stateCache[name] = state;

    return state;
  }
1266587
function loadAsset (asset, varName) {
  if (varName && typeof window[varName] !== 'undefined') {
    return Promise.resolve(window[varName]);
  }

  if (typeof asset === 'string') {
    if (/\.css$/.test(asset)) {
      asset = { src: asset, type: 'css' };
    } else {
      asset = { src: asset };
    }
  }

  var tag;
  if (asset.type === 'css') {
    tag = document.createElement('link');
    tag.setAttribute('rel', 'stylesheet');
    tag.setAttribute('href', asset.src);
  } else {
    tag = document.createElement('script');
    tag.setAttribute('type', 'text/javascript');
    tag.setAttribute('src', asset.src);
  }

  return new Promise(function (resolve) {
    tag.async = true;
    tag.onreadystatechange = tag.onload = function () {
      var state = tag.readyState;
      if (!state || /loaded|complete/.test(state)) {
        resolve(varName ? window[varName] : undefined);
      }
    };
    document.getElementsByTagName('head')[0].appendChild(tag);
  });
}
540752
function resolve($name)
    {
        $name = (string) $name;
        if (!array_key_exists($name, $this->_t_loader_map_resource_MapRes))
            return false;

        return $this->_t_loader_map_resource_MapRes[$name];
    }
347859
function loadModel(modelSpecPath, name) {
  return plugin.myrmex.fire('beforeModelLoad', modelSpecPath, name)
  .spread(() => {
    // Because we use require() to get the spec, it could either be a JSON file
    // or the content exported by a node module
    // But because require() caches the content it loads, we clone the result to avoid bugs
    // if the function is called twice
    const modelSpec = _.cloneDeep(require(modelSpecPath));

    // Lasy loading because the plugin has to be registered in a Myrmex instance before requiring ./model
    const Model = require('./model');
    return Promise.resolve(new Model(name, modelSpec));
  })
  .then(model => {
    // This event allows to inject code to alter the model specification
    return plugin.myrmex.fire('afterModelLoad', model);
  })
  .spread((model) => {
    return Promise.resolve(model);
  });
}
513647
function getFunction(name) {
    return new Promise((resolve, reject) => {
        lambda.getFunctionConfiguration({
            FunctionName: name
        }, function(err, data) {
            if (err) return reject(err);
            resolve(data);
        });
    });
}
590991
@Nullable
  public URL getResource (final String name)
  {
    URL ret = null;

    if (m_aBestCandidate != null)
    {
      ret = m_aBestCandidate.getResource (name);
      if (ret != null)
        return ret;
      m_aBestCandidate = null;
    }

    IClassLoadHelper aLoadHelper = null;

    final Iterator <IClassLoadHelper> iter = m_aLoadHelpers.iterator ();
    while (iter.hasNext ())
    {
      aLoadHelper = iter.next ();
      ret = aLoadHelper.getResource (name);
      if (ret != null)
        break;
    }

    m_aBestCandidate = aLoadHelper;
    return ret;
  }
1763
function(url)  {
					var self = this,
						deferred = $.Deferred();
					/* we are using load so one can specify a target with: url.html #targetelement */
					var $container = $('<div></div>').load(url, function(response, status){
						if ( status !== "error" ) {
							deferred.resolve($container.contents());
						}
						deferred.reject();
					});
					return deferred.promise();
				}
1192848
function loadResources (styleArray) {
  const publicPath = '/public';
  var results = {};
  for (let source of styleArray) {
    if (source.resources) {
      for (let category in source.resources) {
        if (source.resources.hasOwnProperty(category)) {
          if (!results.hasOwnProperty(category)) {
            results[category] = {};
          }
          for (let item in source.resources[category]) {
            results[category][item] = source.resources[category][item];
            results[category][item].dataPromise = new Promise(resolve => {
              getJSON(publicPath + results[category][item].src)
                .then(data => {
                  resolve(data);
                });
            });
          }
        }
      }
    }
  }
  return results;
}
1142196
public function load($name)
    {
        if (!array_key_exists($name, $this->cached)) {
            foreach (array_reverse($this->paths) as $path) {
                foreach ($this->parsers as $ext => $parser) {
                    $file = "$path/$name.$ext";
                    if (is_file($file)) {
                        $this->cached[$name] = new $parser($file);

                        break 2;
                    }
                }
            }
        }

        if (!isset($this->cached[$name])) {
            $this->cached[$name] = new NativeArray;
        }

        return $this->cached[$name];
    }
1265747
function(name) {
    var header = this.headers[Utils.headerize(name)];

    if(header) {
      if(header[0]) {
        return header[0].raw;
      }
    } else {
      return;
    }
  }
283099
function (name) {
            var match, responseHeaders, self = this;    // ie8 will be lowercase for content-type
            // ie8 will be lowercase for content-type
            name = name.toLowerCase();
            if (self.state === 2) {
                if (!(responseHeaders = self.responseHeaders)) {
                    responseHeaders = self.responseHeaders = {};
                    while (match = HEADER_REG.exec(self.responseHeadersString)) {
                        responseHeaders[match[1].toLowerCase()] = match[2];
                    }
                }
                match = responseHeaders[name];
            }
            return match === undefined ? null : match;
        }
680746
function loadRemoteRawData(url) {
  if (!url) {
    // TODO: we should return reject with an appropriate error
    return Promise.resolve(null)
  }

  return new Promise((resolve, reject) => {
    request(url, (error, result) => {
      if (error) {
        reject(error);
      }
      const responseError = detectResponseError(result);
      if (responseError) {
        reject(responseError);
        return;
      }
      resolve(result.response)
    })
  });
}
542541
function load() {
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

  params = (0, _lodash.defaults)({}, params, {
    locale: 'en_US'
  });
  return new Promise(function (resolve, reject) {
    if (window.FB) {
      return resolve(window.FB);
    }

    var src = '//connect.facebook.net/' + params.locale + '/sdk.js';
    var script = document.createElement('script');
    script.id = 'facebook-jssdk';
    script.src = src;
    script.async = true;
    script.addEventListener('load', function () {
      return resolve(window.FB);
    }, false);
    script.addEventListener('error', function () {
      return reject('Error loading Facebook JS SDK from ' + src);
    }, false);

    var sibling = document.getElementsByTagName('script')[0];
    sibling.parentNode.insertBefore(script, sibling);
  });
}