getScripts ** {{{
@param {Object} [props]
@param {String} [props.specialMark="--"]
@param {String} [props.defaultObjectId="__default__"]
@return {Object} - Return all npm script commands (in hash: `[{ cmd, title, ... }]`
354605
function getScripts({ specialMark, defaultObjectId } = {}){

  const packageFilename = path.join(process.cwd(), 'package.json');

  defaultObjectId = defaultObjectId || '__default__';

  specialMark = specialMark || '--';
  specialMark = specialMark.replace(/[[]().*^$]/g, '\\$1');
  const specialEchoRegexp = new RegExp('^echo ' + specialMark + '(.*?)' + specialMark);

  // M.b. error thrown...
  const project = require(packageFilename) || {};

  // Data from `npm-package-user-scripts` section
  const userScriptsData = project['npm-package-user-scripts'] || {};

  // Default object properties
  const userScriptsDefaultObject = userScriptsData[defaultObjectId] || {};

  // Data from `scripts` section
  const scriptsData = project['scripts'] || {};

  const scriptCommands = Object.keys(scriptsData)
    .filter((id) => !id.endsWith('UNUSED') && !id.endsWith('SAMPLE'))
    .reduce((scriptCommands, id) => {
      // Default object: from `npm-package-user-scripts` section or empty object
      const obj = userScriptsData[id] || {};
      // Command from `scripts` section (required!)
      const cmd = obj.cmd || scriptsData[id];
      // Match for special `echo --*--`
      const reg = cmd && cmd.match(specialEchoRegexp);
      // Title form special echo or default object
      const title = (reg && reg[1]) ? reg[1]: obj.title;
      // Title exists?
      if (title && cmd) {
        // ...then append to resulting object
        scriptCommands[id] = Object.assign({}, userScriptsDefaultObject, obj, { title, cmd });
      }
      return scriptCommands;
    }, {})
  ;

  return scriptCommands;

}
318052
public function getAutoCompleteScript(array $commands)
    {
        $dump = [];

        foreach ($commands as $command) {
            $options = [];
            foreach ($command['definition']['options'] as $option) {
                $options[] = (string) $option['name'];
            }

            $dump[$command['name']] = $options;
        }

        $commonOptions = [];
        foreach ($dump as $command => $options) {
            if (empty($commonOptions)) {
                $commonOptions = $options;
            }

            $commonOptions = array_intersect($commonOptions, $options);
        }

        $dump = array_map(
            function ($options) use ($commonOptions) {
                return array_diff($options, $commonOptions);
            },
            $dump
        );

        $switchCase = <<<SWITCHCASE
    %%COMMAND%%)
            opts="\${opts} %%COMMAND_OPTIONS%%"
            ;;
SWITCHCASE;

        $switchContent = '';
        foreach ($dump as $command => $options) {
            if (empty($options)) {
                continue;
            }

            $switchContent .= str_replace(
                ['%%COMMAND%%', '%%COMMAND_OPTIONS%%'],
                [$command, implode(' ', $options)],
                $switchCase
            );
        }

        return str_replace(
            ['%%COMMANDS%%', '%%SHARED_OPTIONS%%', '%%SWITCH_CONTENT%%'],
            [implode(' ', array_column($commands, 'name')), implode(' ', $commonOptions), $switchContent],
            $this->autocompleteScript
        );
    }
783655
public function getScripts()
    {
        $retVal = '';
        while ( $this->scripts->valid() ) {
            $retVal .= "<script type='text/javascript'>\n{$this->scripts->get()}\n</script>\n";
            $this->scripts->next();
        }
        
        return $retVal;
    }
358102
public List<String> getScript(String scriptName) {
		String scriptFilename = this.scriptMap.get(scriptName);
		InputStream scriptFileStream = FileUtils.getFileInputStream(scriptFilename);
		
		List<String> sqlList = new SqlScriptReader().getSQLList(scriptFileStream);

		return sqlList;
	}
417449
function getCommandNames(cmds) {
  var commands = _.map(cmds, '_name');
  commands = commands.concat.apply(commands, _.map(cmds, '_aliases'));
  commands.sort();
  return commands;
}
83536
def command_objects(names=self.commands, command_array=Boson.commands)
      command_array.select {|e| names.include?(e.name) && e.lib == self.name }
    end
321052
function getCommands( str ){
	var commands = str.split('|');

	commands.forEach(function( command, key ){
		var args = command.split(':');

		args.forEach(function( arg, k ){
			args[k] = trim( arg );
		});

		commands[key] = {
			command: command,
			method: args.shift(),
			args: args
		};
	});

	return commands;
}
659286
function showHelp(specifiedScripts) {
    if (parsedArgv.help) {
      // if --help was specified, then yargs will show the default help
      log.info(help(psConfig))
      return true
    }
    const helpStyle = String(psConfig.options['help-style'])
    const hasDefaultScript = Boolean(psConfig.scripts.default)
    const noScriptSpecifiedAndNoDefault =
      !specifiedScripts.length && !hasDefaultScript
    const hasHelpScript = Boolean(psConfig.scripts.help)
    const commandIsHelp =
      isEqual(specifiedScripts[0], 'help') && !hasHelpScript
    const shouldShowSpecificScriptHelp =
      commandIsHelp && specifiedScripts.length > 1
    if (shouldShowSpecificScriptHelp) {
      log.info(specificHelpScript(psConfig, specifiedScripts[1]))
      return true
    } else if (commandIsHelp || noScriptSpecifiedAndNoDefault) {
      // Can't achieve 100% branch coverage without refactoring this showHelp()
      // function into ./index.js and re-working existing tests and such. Branch
      // options aren't relevant here either, so telling Istanbul to ignore.
      /* istanbul ignore next */
      if (helpStyle === 'all') {
        parser.showHelp('log')
      }
      log.info(help(psConfig))
      return true
    }

    return false
  }
916170
function getFileNames(fileNames = [], componentName) {
  const defaultFileNames = {
    testFileName: `${defaultOptions.testFileName}.${componentName}`,
    componentFileName: componentName,
    styleFileName: componentName,
  }

  const formattedFileNames = Object.keys(fileNames).reduce(
    (acc, curr) => {
      acc[curr] = replaceKeys(fileNames[curr], componentName)
      return acc
    },
    { ...defaultFileNames }
  )

  return formattedFileNames
}
21692
public Result getScript(boolean indexRoots) {

        Result   r = Result.newSingleColumnResult("COMMAND", Type.SQL_VARCHAR);
        String[] list = getSettingsSQL();

        addRows(r, list);

        list = getGranteeManager().getSQL();

        addRows(r, list);

        // schemas and schema objects such as tables, sequences, etc.
        list = schemaManager.getSQLArray();

        addRows(r, list);

        // index roots
        if (indexRoots) {
            list = schemaManager.getIndexRootsSQL();

            addRows(r, list);
        }

        // user session start schema names
        list = getUserManager().getInitialSchemaSQL();

        addRows(r, list);

        // grantee rights
        list = getGranteeManager().getRightstSQL();

        addRows(r, list);

        list = getPropertiesSQL();

        addRows(r, list);

        return r;
    }
123569
def props(cls):
    
    return {k:v for (k, v) in inspect.getmembers(cls) if type(v) is Argument}
703374
function getAllCommands() {
    let resourceTypes = [];
    let tables = {};
    Object.keys(manifest).forEach(key => {
        const { [key]: category } = manifest;
        Object.keys(category.operations).forEach((operationKey) => {
            let operation = category.operations[operationKey];
            let opCategory = operation.target[0] || operation.methodAlias;
            if (resourceTypes.indexOf(opCategory) < 0) {
                resourceTypes.push(opCategory);
                tables[opCategory] = [];
            }
            tables[opCategory].push([chalk.cyan.bold(operation.command), operation.description]);
        });
    });

    resourceTypes.sort();

    let sections = [];
    for (let resourceType of resourceTypes) {
        tables[resourceType].sort((a, b) => a[0].localeCompare(b[0]));
        sections.push({
            head: chalk.white.bold(resourceType),
            table: tables[resourceType]
        });
    }

    return sections;
}
1215016
function getCompletions (str, list, isCmd) {
  var result = []
  list.forEach(function (f) {
    var a = isCmd ? npm.deref(f) : f
    if (result.indexOf(a) === -1 && f.indexOf(str) === 0) {
      result.push(a)
    }
  })
  return result
}
237067
function getClassNames(props) {
  return Object.keys(props).
    filter(key => classMap[key]).
    map(key => styles[Number.isInteger(props[key]) ? `${classMap[key]}-${props[key]}` : classMap[key]]);
}
1054924
function getBowerCommand(cmd) {
    // bower has some commands that are provided in a nested object structure, e.g. `bower cache clean`.
    var bowerCommand;

    // clean up the command given, to avoid unnecessary errors
    cmd = cmd.trim();

    var nestedCommand = cmd.split(' ');

    if (nestedCommand.length > 1) {
        // To enable that kind of nested commands, we try to resolve those commands, before passing them to bower.
        for (var commandPos = 0; commandPos < nestedCommand.length; commandPos++) {
            if (bowerCommand) {
                // when the root command is already there, walk into the depth.
                bowerCommand = bowerCommand[nestedCommand[commandPos]];
            } else {
                // the first time we look for the "root" commands available in bower
                bowerCommand = bower.commands[nestedCommand[commandPos]];
            }
        }
    } else {
        // if the command isn't nested, just go ahead as usual
        bowerCommand = bower.commands[cmd];
    }

    // try to give a good error description to the user when a bad command was passed
    if (bowerCommand === undefined) {
        throw new PluginError(PLUGIN_NAME, 'The command \'' + cmd + '\' is not available in the bower commands');
    }

    return bowerCommand;
}
1160964
function(props) {
  const { object, defaultRep } = props;
  const rep = getRep(object, defaultRep, props.noGrip);
  return rep(props);
}
1206261
function getObjectWithKeyAsMjs(key, object) {
	const mjsContents = Object.keys(object).reduce((mjsLines, name) => {
		mjsLines.push(`\t'${escapeForJS(name)}': '${escapeForJS(object[name])}'`);

		return mjsLines;
	}, []).join(',\n');
	const mjs = `export const ${key} = {\n${mjsContents}\n};\n`;

	return mjs;
}