Get function configuration by its name

@return {Promise} which resolves into the function configuration
513647
function getFunction(name) {
    return new Promise((resolve, reject) => {
        lambda.getFunctionConfiguration({
            FunctionName: name
        }, function(err, data) {
            if (err) return reject(err);
            resolve(data);
        });
    });
}
885819
public function get_config_functions() {
        $configfunctions = '';
        foreach ($this->jsconfigfunctions as $functionname => $function) {
            $configfunctions .= "var {$functionname} = function(me) {";
            $configfunctions .= $function;
            $configfunctions .= "};\n";
        }
        return $configfunctions;
    }
642438
function asPromise (fn) {
  return new Promise((resolve, reject) => {
    fn((err, result) => {
      if (err) {
        return reject(err)
      }
      resolve(result)
    })
  })
}
56554
function isFunctionPromiseable(_thisObject, name, fn) {
     if (/Sync$/.test(name)) {
          return typeof _thisObject[ name.substring(0, name.length - 4) ] === "function";
     } else {
          return typeof _thisObject[ name + "Sync" ] === "function";
     }
}
469273
function resolve(promise) {
    var method = promise.state === FULFILLED ? 'onFulfilled' : 'onRejected';
    var arg = method === 'onFulfilled' ? promise.value : promise.reason;
    var handler, value;

    nextTick(function() {
      var isPromise;

      while (promise.handlers[0]) {
        handler = promise.handlers.shift();

        try {
          value = handler[method](arg);

          // Handle "thenables" as well as Promises
          isPromise = value instanceof Promise || value && isFunc(value.then);

          if (isPromise) {
            value.then(function(value) { fulfill(handler.promise, value); },
                       function(reason) { reject(handler.promise, reason); });
          } else {
            fulfill(handler.promise, value);
          }
        } catch(err) {
          reject(handler.promise, err);
        }
      }
    });

    return promise;
  }
317722
function _getPathFromNpm () {
  return new Promise((resolve) => {
    exec('npm config --global get prefix', (err, stdout) => {
      if (err) {
        resolve(null)
      } else {
        const npmPath = stdout.replace(/\n/, '')
        debug(`PowerShell: _getPathFromNpm() resolving with: ${npmPath}`)
        resolve(npmPath)
      }
    })
  })
}
777411
function getPluginConfig(config, pluginName) {
    var pluginsConfig = config.getValues().get('pluginsConfig');
    if (pluginsConfig === undefined) {
        return {};
    }
    var pluginConf = pluginsConfig.get(pluginName);
    if (pluginConf === undefined) {
        return {};
    } else {
        return pluginConf.toJS();
    }
}
1264544
function getConfig(api) {
  const conf = api.resolveChainableWebpackConfig()

  // because we are dealing with hot replacement in vsg
  // remove duplicate hot module reload plugin
  conf.plugins.delete('hmr')

  // remove the double compiled successfully message
  conf.plugins.delete('friendly-errors')
  return api.resolveWebpackConfig(conf)
}
811442
function getConfig(config) {
  require('./test.karma.conf')(config);
  config.set({
    autoWatch: true,
    singleRun: false
  });
}
128974
function Config() {

    if (!Config._instance) {
        Config._instance = this;
        this._silentConsole = false;
        ShellJS.config.silent = true;
    }

    return Config._instance;
}
6990
protected String resolveFunctionName(Environment env) {
        return env.getProperty(LocalFunctionRegistry.FUNCTION_NAME, String.class, (String) null);
    }
511914
function promisesWrapper(func) {
    return (options, callback) => {
        // options is an optional argument
        if (typeof options === 'function') {
            callback = options;
            options = undefined;
        }
        options = options || {};
        // just call the function otherwise wrap a promise around its execution
        if (typeof callback === 'function') {
            func(options, callback);
            return undefined;
        } else {
            return new Promise((fulfill, reject) => {
                func(options, (err, result) => {
                    if (err) {
                        reject(err);
                    } else {
                        fulfill(result);
                    }
                });
            });
        }
    };
}
285230
function makeDeferred() {
  var resolvePromise = null;
  var rejectPromise = null;

  var promise = new Promise(function (resolve, reject) {
    resolvePromise = resolve;
    rejectPromise = reject;
  });

  return {
    promise: promise,
    resolve: resolvePromise,
    reject: rejectPromise
  };
}
1193678
function getConfigFromLS() {
    var configStr = localStorage[getFullBSKey(browser_storage_config_1.browserStorageConfig.DB_CONFIG_KEY)];
    if (typeof configStr === 'undefined') {
        return null;
    }
    else {
        return JSON.parse(configStr);
    }
}
1353679
function PromiseFactory() {
	var deferred = whenjs.defer();
	//var timeout = setTimeout(function () { console.log(t, 'Promise timed out')}, 3000);

	this.reject = function (err) {
		deferred.reject(err);
	};
	this.resolve = function (val) {
	//	clearTimeout(timeout);
		deferred.resolve(val);
	};
	this.promise = function () {
		return deferred.promise;
	};
}
194383
function config_resolve({context}) {
    return () => {
        let config_part = {
            /*
            resolveLoader: {modules: [
             // __dirname+'/',
                pathModule.join(__dirname, "../node_modules"),
            ]},
            */
            context,
        };
        const extra_paths = (process.env['NODE_PATH']||'').split(':').filter(Boolean);
        if( extra_paths.length > 0 ) {
            config_part = {
                ...config_part,
                resolve: {modules: [
                    "node_modules",
                    ...extra_paths,
                ]},
            };
        }
        return config_part;
    };
}
1357210
function rebuildAsPromise(_thisObject, name, fn) {
    // if is a regular function, that has an async correspondent also make it promiseable
    if (!isFunctionAsync(_thisObject, name, fn)) {
        return function() {
            var that = this,
                args = arguments;

            return blinkts.lang.promiseCode(function() {
                return fn.apply(that, args);
            });
        };
    }

    // if it's an async function, make it promiseable.
    return function() {
		var args = Array.prototype.slice.apply(arguments),
			that = this;

		return new blinkts.lang.Promise(function(fulfill, reject) {
			args.push(function(err, r) {
				if (err) {
					reject(err);
				}

				if (arguments.length > 2) { // if the callback received multiple arguments, put them into an array.
					fulfill(Array.prototype.slice.call(arguments, 1));
				} else {
					fulfill(r);
				}
			});

			try {
				var result = fn.apply(that, args);
			} catch (e) { // if the function failed, so we don't get a chance to get our callback called.
				reject(e);
			}
		});
    };
}