Returns the options (if any) that can be used in the specified attribute
@param {Object} node The AST node for the attribute we are completing within
@param {Object} params The parameters
@returns {Array.<Object>} The array of proposals
@since 10.0
774378
function(node, source, params) {
			var proposals = [];
			var prefix = params.prefix ? params.prefix : "";
			// we need to check if we need to rebuild the prefix for completion that contains a '-'
			var index = params.offset - prefix.length - 1;
			if (index > 0 && index < source.length) {
				var precedingChar = source.charAt(index);
				if (precedingChar === '=' && prefix.length === 0 && (index - 1) > 0) {
					precedingChar = source.charAt(index - 1);
					if (/[A-Za-z0-9_]/.test(precedingChar)) {
						if (index + 1 >= source.length || 
								(source.charAt(index + 1) !== '\"' && source.charAt(index + 1) !== "'")) {
							proposals.push(this.makeComputedProposal("\"\"",  Messages['addQuotesToAttributes'], " - \"\"", null, prefix)); //$NON-NLS-1$ //$NON-NLS-2$
						}
					}
				}
			}
			var vals = Attributes.getValuesForAttribute(node);
			if(Array.isArray(vals)) {
				proposals = proposals.concat(this.addProposals(node, vals, params));
			}
			return proposals;	
		}
1269754
function pickParams(params, keys) {
    params = _.cloneDeep(params);
    // decamelize all options
    for (var key in params) {
        var value = params[key];
        delete params[key];
        // TODO: handle this inconsistency consistently in the library :(
        // 'base64String': introduced by 'image.upload()'
        if (["base64String"].indexOf(key) === -1) {
            key = decamelize(key, "_");
        }
        params[key] = value;
    }
    if (SETTINGS.enforce_params_filter) {
        return _.pick(params, keys);
    }
    return params;
}
1067601
function getSelector(node) {
  var selector = arguments.length <= 1 || arguments[1] === undefined ? [node.name] : arguments[1];

  var parent = node.parent;
  if (parent) {
    var children = parent.children;
    var matches = children.filter(function (child) {
      return child.name === node.name;
    });
    if (matches.length > 1) {
      for (var i = 0, l = matches.length; i < l; i++) {
        if (matches[i] === node) {
          selector[0] = selector[0] + ':nth-of-type(' + (i + 1) + ')';
          break;
        }
      }
    }
    selector.unshift(parent.name);
  }
  return parent && parent.parent ? getSelector(parent, selector) : selector.join(' > ');
}
81597
function getAttribs(node) {
          var attribs = {};

          each(dom.getAttribs(node), function (attr) {
            var name = attr.nodeName.toLowerCase();

            // Don't compare internal attributes or style
            if (name.indexOf('_') !== 0 && name !== 'style' && name.indexOf('data-') !== 0) {
              attribs[name] = dom.getAttrib(node, name);
            }
          });

          return attribs;
        }
626836
function(ast, params) {
			var node = util.findNodeAtOffset(ast, params.offset);
			if(node) {
				if(this.inScriptOrStyle(node, params.offset, ast.source) || this.inClosingTag(node, params.offset, ast.source)) {
					return [];
				}
				if (this.isCompletingCommentClose(node, params.offset)){
					return this.getComment(node, params.offset, ast.source, false);
				} else if (this.isCompletingAttributeValue(node, ast.source, params)) {
					return this.getValuesForAttribute(node, ast.source, params);
				} else if (this.isCompletingTagAttribute(node, ast.source, params)) {
					return this.getAttributesForNode(node, ast.source, params);
				} else if (this.isCompletingTag(node, params)){
					if (this.isCompletingCommentOpen(node)){
						return this.getComment(node, params.offset, ast.source, true);
					}
					if (this.isCompletingTagWithMatchingClose(node, ast.source)){
						return [];
					}
					return this.getTags(ast.source, params);
				}
				return this.getProposalsForTextContent(node, ast.source, params);
			}
			
			// If we have a non-empty source file with no valid tags, still offer tag completions
			return this.getTags(ast.source, params);
		}
458998
function _parseParams(params) {
  return params.map((param) => {
    let result;
    switch (param.type) {
      case 'Identifier':
        result = new Param(param.name);
        break;
      case 'AssignmentPattern':
        result = new Param(param.left.name, true);
        break;
      case 'ObjectPattern': {
        const objParams = param.properties.map((objParam) => objParam.value);
        result = new Param('arguments', false, _parseParams(objParams));
        break;
      }
      default:
    }
    return result;
  });
}
341265
function attributes(node) {
    var obj = {};
    each(function(attr) {
      obj[attr.name] = attr.value;
    }, node.attributes);
    return obj;
  }
882702
function evaluateTypedParameters(node, msg, param, type) {
        console.log('eval - p:%s, t:%s', param, type);
        let prop;
        if (type === 'jsonata') {
            prop = RED.util.evaluateJSONataExpression(param, msg);
        } else {
            prop = RED.util.evaluateNodeProperty(param, type, node, msg);
        }
        return prop;
    }
580269
function getOptions(options, cb) {
  options = options || {};
  options.sourceComments = options.sourceComments || false;
  options.data = options.data || null;
  options.file = getInputFile(options);
  options.outFile = getOutputFile(options);
  options.includePaths = (options.includePaths || []).join(path.delimiter);
  options.precision = parseInt(options.precision) || 5;
  options.sourceMap = getSourceMap(options);
  options.style = getStyle(options);
  options.indentWidth = getIndentWidth(options);
  options.indentType = getIndentType(options);
  options.linefeed = getLinefeed(options);

  // context object represents node-sass environment
  options.context = { options: options, callback: cb };

  options.result = {
    stats: getStats(options)
  };

  return options;
}
166360
function model (node, dir) {
  if (!node.children) { return }
  var value = dir.value;
  var isMultiple = node.data.attrs && node.data.attrs.multiple;
  for (var i = 0, l = node.children.length; i < l; i++) {
    var option = node.children[i];
    if (option.tag === 'option') {
      if (isMultiple) {
        var selected =
          Array.isArray(value) &&
          (looseIndexOf(value, getValue(option)) > -1);
        if (selected) {
          setSelected(option);
        }
      } else {
        if (looseEqual(value, getValue(option))) {
          setSelected(option);
          return
        }
      }
    }
  }
}
527529
function(attrs) {
      var options = {};
      for(var key in attrs) {
        if (key.match(/^\$/) || key.match(/^ng[A-Z]/)) {
          void(0);
        } else {
          options[key] = attrs[key];
        }
      }
      return options;
    }
1139763
function(node) {
        return({
            x: parseFloat(node.getAttributeNS(null, "cx")),
            y: parseFloat(node.getAttributeNS(null, "cy"))
        });
    }
1108416
function getTokens(node) {
            const arrow = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken);

            return {
                before: sourceCode.getTokenBefore(arrow),
                arrow,
                after: sourceCode.getTokenAfter(arrow)
            };
        }
530116
function getArguments(node) {
    if (node && node.arguments && node.arguments.length > 0) {
        return node.arguments;
    }
    return [];
}
821198
function getRangesFromCSSNode(node) {
	let ranges;

	if (node.type === 'rule') {
		ranges = [ getRange(node.selectorToken) ].concat(node.parsedSelector.map(getRange));
	} else if (node.type === 'at-rule') {
		const nameEndToken = node.expressionToken || node.nameToken;
		ranges = [
			new Range(node.nameToken.start, nameEndToken.end),
			getRange(node.nameToken),
			getRange(node.expressionToken)
		];
		node.parsedExpression.forEach(token => {
			ranges.push(getRange(token));
			iterateCSSToken(token, t => {
				if (t.type === 'argument') {
					ranges.push(getRange(t));
				}
			});
		});
	} else if (node.type === 'property') {
		ranges = [
			getRange(node),
			getRange(node.nameToken),
			getRange(node.valueToken)
		];
		node.parsedValue.forEach(value => {
			// parsed value contains a comma-separated list of sub-values,
			// each of them, it turn, may contain space-separated parts
			ranges.push(getRange(value));

			for (let i = 0, il = value.size, token; i < il; i++) {
				token = value.item(i);
				if (token.type === 'url') {
					ranges.push(getRange(token), getRange(token.item(0)));
				} else if (token.type !== 'whitespace' && token !== 'comment') {
					ranges.push(getRange(token));

					iterateCSSToken(token, t => {
						if (t.type === 'argument') {
							ranges.push(getRange(t));
						}
					});
				}
			}
		});
	}

	return ranges ? uniqueRanges(ranges.filter(Boolean)) : [];
}
1051734
private static void paramNamesOf(Node node, ImmutableList.Builder<Node> names) {
    switch (node.getToken()) {
      case NAME:
        names.add(node);
        break;

      case REST:
      case DEFAULT_VALUE:
        paramNamesOf(node.getFirstChild(), names);
        break;

      case PARAM_LIST:
      case ARRAY_PATTERN:
        for (Node child = node.getFirstChild(); child != null; child = child.getNext()) {
          paramNamesOf(child, names);
        }
        break;

      case OBJECT_PATTERN:
        for (Node child = node.getFirstChild(); child != null; child = child.getNext()) {
          checkArgument(child.isStringKey() || child.isComputedProp(), child);
          paramNamesOf(child.getLastChild(), names);
        }
        break;

      default:
        checkArgument(false, node);
        break;
    }
  }
1023597
function() {
  var args = Array.from(arguments)
  var url = _.get(args, '[0]', '')
  var params = _.get(args, '[1]', {})

  // if we specify all of the options as a param object, we're basically done
  // and we can skip all of the parameterization checks below
  if (_.isPlainObject(_.get(args, '[0]', {})))
  {
    params = _.get(args, '[0]', {})
  }
   else
  {
    params = _.assign({}, { url }, params)
  }

  return _.assign({}, params, { op: 'request' })
}