Generate string for header from gettext function

@param {object} gettextFunctions

@return {Array}
498113
function keywordsListStrings (gettextFunctions) {
  const methodStrings = [];

  for (const getTextFunction of gettextFunctions) {
    let methodString = getTextFunction.name;

    if (getTextFunction.plural || getTextFunction.context) {
      methodString += ':1';
    }
    if (getTextFunction.plural) {
      methodString += `,${getTextFunction.plural}`;
    }
    if (getTextFunction.context) {
      methodString += `,${getTextFunction.context}c`;
    }

    methodStrings.push(methodString);
  }

  return methodStrings;
}
1260848
function getIndentText (firstToken) {
    const text = sourceCode.text
    let i = firstToken.range[0] - 1

    while (i >= 0 && !LT_CHAR.test(text[i])) {
      i -= 1
    }

    return text.slice(i + 1, firstToken.range[0])
  }
858339
function headerTextList( $parameters = array() )
    {
        $convert = true;
        if ( isset( $parameters['convert'] ) )
            $convert = $parameters['convert'];
        $textElements = array();
        $headers = $this->headers( $parameters );
        foreach ( $headers as $header )
        {
            $headerText = $this->blankNewlines( $header['name'] ) . ': ';
            $contentText = $this->blankNewlines( $this->contentString( $header['content'] ) );
            $headerText .= $contentText;
            $textElements[] = $headerText;
        }
        return $textElements;
    }
166653
function parseHeaders(headers) {
  var parsed = {}, key, val, i;

  if (!headers) return parsed;

  forEach(headers.split('\n'), function(line) {
    i = line.indexOf(':');
    key = lowercase(trim(line.substr(0, i)));
    val = trim(line.substr(i + 1));

    if (key) {
      if (parsed[key]) {
        parsed[key] += ', ' + val;
      } else {
        parsed[key] = val;
      }
    }
  });

  return parsed;
}
79364
function parseHeaders() {
  var str = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];

  var lines = str.split(/\r?\n/);
  var fields = {};
  var index = undefined;
  var line = undefined;
  var field = undefined;
  var val = undefined;

  lines.pop(); // trailing CRLF

  for (var i = 0, len = lines.length; i < len; i += 1) {
    line = lines[i];
    index = line.indexOf(':');
    field = line.slice(0, index).toLowerCase();
    val = trim(line.slice(index + 1));
    fields[field] = val;
  }

  return fields;
}
906720
function getGlotPressFunction( properties ) {
	var wpFunc = [ '_' ];

	if ( properties.plural ) {
		wpFunc.push( 'n' );
	}
	if ( properties.context ) {
		wpFunc.push( 'x' );
	}

	wpFunc = wpFunc.join( '' );

	if ( 1 === wpFunc.length ) {
		return '__';
	}

	return wpFunc;
}
1283174
function _psToFunction(ps) {
    var result = null;
    if (_.isString(ps)) {
        result = function() {
            return ps;
        };
    } else if (_.isFunction(ps)) {
        result = ps;
    } else {
        result = function() {
            return '> ';
        };
    }

    return result;
}
505177
function getContent(func) {
  var lines = func.toString().split('\n');
  // Drop the function declaration and closing bracket
  var onlyBody = lines.slice(1, lines.length -1);
  // Drop line number comments generated by Meteor, trim whitespace, make string
  onlyBody = _.map(onlyBody, function(line) {
    return line.slice(0, line.lastIndexOf("//")).trim();
  }).join('\n');
  // Make it look normal
  return beautify(onlyBody, { indent_size: 2 });
}
635432
function getColHeaderInfos(table) {
      var cols = this.getCols(table);
      var arr = cols.map(function (col) {
        // col.textEl.dom.textContent // slower but more honest.
        // TODO: getConfig().tooltip - проверить.
        var text = tiaEJ.convertTextToFirstLocKey(col.text);
        if (text === col.emptyCellText) {
          text = ''; // <emptyCell>
        }
        var info = col.getConfig('xtype') + ': "' + text + '"';
        var toolTip = col.getConfig().toolTip;
        if (toolTip) {
          info += ', toolTip: ' + tiaEJ.convertTextToFirstLocKey(toolTip);
        }
        // if (col.items) {
        //   info += ', items: ' + JSON.stringify(col.items);
        // }
        // if (col.getConfig('xtype') === 'actioncolumn') { //
        //   console.dir(col);
        //   window.c2 = col;
        // }
        return info;
      });
      return arr;
    }
484127
function extractHeaders(options) {
    let headers = {};
    if (options && options.headers) {
        headers = options.headers;
        delete options.headers;
    }
    return headers;
}
45353
function getHeaderContent(tokens, type, markup) {
  if (tokens[1].children.length === 0) {
    tokens[1].children.push(getEmptyText());
  } else if (tokens[1].children[0].type !== 'text') {
    tokens[1].children.unshift(getEmptyText());
  }
  const content = changeText(tokens[1].children, markup);
  return {
    type,
    content,
    length: getTokensLength(content)
  };
}
890272
function Header(props, context) {
	const { todos } = props;
	const remainingText = `${ todos.incompleteSize } ${ pluralize("item", todos.incompleteSize ) } remaining`;

	return <h1>
			F.lux Todos <small>{ remainingText }</small>
		</h1>
}
202665
function parseResponseHeaders (headers) {
  var parsed = {};

  if (headers) {
    headers.split('\n').forEach(function (line) {
      var separatorIndex = line.indexOf(':');
      var key = line.substr(0, separatorIndex).trim().toLowerCase();
      var value = line.substr(separatorIndex + 1).trim().toLowerCase();

      if (key) {
        parsed[key] = value;
      }
    });
  }

  return parsed;
}
1148586
def _get(function, return_format=None):
    
    if return_format:
        return requests.get(''.join([__BASE_URL, function, return_format])).text
    return requests.get(''.join([__BASE_URL, function, JSON])).json()
1158064
function getDefaultTexts (defOptions, credentials, token, translationKey, callback) {
  var options;
  
  translationKey = translationKey || '';
  
  if (typeof translationKey === 'function') {
    callback = translationKey;
    translationKey = '';
  }
  
  options = {
    method : 'GET',
    uri : `v1/DefaultTexts/${translationKey}`,
  };
  
  return requestWithTokenCheck(defOptions, credentials, token, options, callback);
}
196831
def string_chain(text, filters):
        
        if filters is None:
            return text

        for filter_function in filters:
            text = filter_function(text)

        return text
77599
function toFunctionExpression(node) {
            const params = node.params
            const paramText = params.length
                ? sourceCode.text.slice(
                      params[0].range[0],
                      params[params.length - 1].range[1]
                  )
                : ""

            const arrowToken = sourceCode.getTokenBefore(
                node.body,
                isArrowToken
            )
            const preText = sourceCode.text.slice(
                arrowToken.range[1],
                node.body.range[0]
            )
            const bodyText = sourceCode.text.slice(
                arrowToken.range[1],
                node.range[1]
            )

            if (node.body.type === "BlockStatement") {
                return `function(${paramText})${bodyText}`
            }
            if (preText.includes("\n")) {
                return `function(${paramText}){return(${bodyText})}`
            }
            return `function(${paramText}){return ${bodyText}}`
        }