Options:

(String) depth - option value for Depth header.
(Array.<Object>) props - list of props to request.
(Number) syncLevel - indicates scope of the sync report request.
(String) syncToken - synchronization token provided by the server.
495275
function syncCollection(options) {
  var requestData = template.syncCollection({
    props: options.props,
    syncLevel: options.syncLevel,
    syncToken: options.syncToken
  });

  function transformRequest(xhr) {
    setRequestHeaders(xhr, options);
  }

  function transformResponse(xhr) {
    var object = (0, _parser.multistatus)(xhr.responseText);
    var responses = object.response.map(function (res) {
      return { href: res.href, props: getProps(res.propstat) };
    });

    return { responses: responses, syncToken: object.syncToken };
  }

  return new Request({
    method: 'REPORT',
    requestData: requestData,
    transformRequest: transformRequest,
    transformResponse: transformResponse
  });
}
1247685
function mapUrlChangeHandlersToProps(props) {
  return {
    onChangeFoo: (value) => replaceInUrlQuery('fooInUrl', encode(UrlQueryParamTypes.number, value)),
    onChangeBar: (value) => replaceInUrlQuery('bar', value),
  }
}
266137
function queryProperties(props, nodeTypeStack, childIndexStack = [], text) {
  let stateId = 0
  for (let i = 0, {length} = nodeTypeStack; i < length; i++) {
    const nodeType = nodeTypeStack[i];
    const state = props.states[stateId];
    let found_transition = false;
    for (const transition of state.transitions) {
      if (
        (transition.type === nodeType) &&
        (transition.index == null || transition.index === childIndexStack[i]) &&
        (transition.text == null || new RegExp(transition.text).test(text))
      ) {
        stateId = transition.state_id;
        found_transition = true;
        break;
      }
    }
    if (!found_transition) {
      stateId = state.default_next_state_id
    }
    // console.log(
    //   nodeType, '->', stateId,
    //   props.property_sets[props.states[stateId].property_set_id]
    // );
  }
  return props.property_sets[props.states[stateId].property_set_id]
}
1202793
function getValuesList (stateObject, chunkNames) {
      getValuesList_accumulator.length = 0;
      var chunkNamesLength = chunkNames.length;

      for (var i = 0; i < chunkNamesLength; i++) {
        getValuesList_accumulator.push(stateObject[chunkNames[i]]);
      }

      return getValuesList_accumulator;
    }
169252
function(props) {
      var serialisedProps = [], key;
      if (typeof props != string) {
        for (key in props) {
          serialisedProps.push(cssstyle(key) + ':' + props[key]);
        }
        serialisedProps = serialisedProps.join(';');
      } else {
        serialisedProps = props;
      }
      return serialisedProps;
    }
679576
private Map<String, Object> getFieldValues(Object caller, ISyncHandler<?, ? extends ISyncableData> handler, String... syncNames)
	{
		Map<String, Object> values = new LinkedHashMap<>();
		for (String str : syncNames)
		{
			ObjectData od = handler.getObjectData(str);
			if (od != null)
				values.put(str, od.get(caller));
		}

		return values;
	}
881300
function (options) {
        /**
         * The header Key
         * @type {String}
         * @todo avoid headers with falsy key.
         */
        this.key = _.get(options, 'key') || E;

        /**
         * The header value
         * @type {String}
         */
        this.value = _.get(options, 'value') || E;

        /**
         * Indicates whether the header was added by internal SDK operations, such as authorizing a request.
         * @type {*|boolean}
         */
        _.has(options, 'system') && (this.system = options.system);

        /**
         * Indicates whether the header should be .
         * @type {*|boolean}
         * @todo figure out whether this should be in property.js
         */
        _.has(options, 'disabled') && (this.disabled = options.disabled);
    }
179014
function(url, next, headers, options) {
    var headerStruct = {
      'User-Agent': 'request'
    };

    var params = {
      url : url,
      method : 'GET'
    };

    if (headers) {
      for (var k in headers) {
        if (headers.hasOwnProperty(k)) {
          headerStruct[k] = headers[k];
        }
      }
    }

    params.headers = headerStruct;
    params.gzip = true;

    if (options) {
      for (var k in options) {
        if (options.hasOwnProperty(k)) {
          params[k] = options[k];
        }
      }
    }

    if (next) {
      request(params, function(error, res, body) {
          if (res && res.headers && -1 !== res.headers['content-type'].indexOf('json') || -1 !== res.headers['content-type'].indexOf('javascript')) {
            try {
              body = JSON.parse(body);
            } catch (e) {
              error = e.message;
            }
          }

          if (404 === res.statusCode) {
            next('Not Found', body, res.headers, res.statusCode);
          } else {
            next(error, body, res ? res.headers : null, res ? res.statusCode : null);
          }
        }
      );
    } else {
      return request(params);
    }
  }
1302931
function(rendererHelper) {
      if (!rendererHelper || !rendererHelper.compositorThread)
        return;

      var compositorThread = rendererHelper.compositorThread;
      var gestureScrollUpdateStart = this.start;
      var gestureScrollUpdateEnd = this.end;

      var allCompositorAsyncSlices =
        compositorThread.asyncSliceGroup.slices;

      for (var i in allCompositorAsyncSlices) {
        var slice = allCompositorAsyncSlices[i];

        if (slice.title !== 'Latency::ScrollUpdate')
          continue;

        var parentId = slice.args.data.
            INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT.
            sequence_number;

        if (parentId === undefined) {
          // Old trace, we can only rely on the timestamp to find the slice
          if (slice.start < gestureScrollUpdateStart ||
              slice.start >= gestureScrollUpdateEnd)
            continue;
        } else {
          // New trace, we can definitively find the latency slice by comparing
          // its sequence number with gesture id
          if (parseInt(parentId) !== parseInt(this.id))
            continue;
        }

        slice.associatedEvents.forEach(function(event) {
          this.associatedEvents_.push(event);
        }, this);
        break;
      }
    }
978125
def parse_options(self, args, depth=0):
        
        try:
            options, remaining_args = getopt.gnu_getopt(args,
                'CPRSTbc:d:eghi:lmnpqsvwz',
                ('no-commit', 'no-tag', 'no-register', 'no-upload', 'dry-run',
                 'sign', 'identity=', 'dist-location=', 'version', 'help',
                 'push', 'quiet', 'svn', 'hg', 'git', 'develop', 'binary',
                 'list-locations', 'config-file=', 'wheel', 'zip', 'gztar',
                 'manifest-only', 'trace', 'egg', 'no-push'))
        except getopt.GetoptError as e:
            err_exit('mkrelease: %s\n%s' % (e.msg, USAGE))

        for name, value in options:
            if name in ('-C', '--no-commit'):
                self.skipcommit = True
            elif name in ('-T', '--no-tag'):
                self.skiptag = True
            elif name in ('-R', '--no-register'):
                self.skipregister = True
            elif name in ('-S', '--no-upload'):
                self.skipupload = True
            elif name in ('-n', '--dry-run'):
                self.skipcommit = self.skiptag = self.skipregister = self.skipupload = True
            elif name in ('-p', '--push'):
                self.push = True
            elif name in ('-P', '--no-push'):   # undocumented
                self.push = False
            elif name in ('-q', '--quiet'):
                self.quiet = True
            elif name in ('-s', '--sign'):
                self.sign = True
            elif name in ('-i', '--identity'):
                self.identity = value
            elif name in ('-d', '--dist-location'):
                self.locations.extend(self.locations.get_location(value))
            elif name in ('-l', '--list-locations'):
                self.list = True
            elif name in ('-m', '--manifest-only'):
                self.manifest = True
            elif name in ('-h', '--help'):
                msg_exit(HELP)
            elif name in ('-v', '--version'):
                msg_exit(VERSION)
            elif name in ('--svn', '--hg', '--git'):
                self.scmtype = name[2:]
            elif name in ('-e', '--develop'):
                self.develop = True
            elif name in ('-z', '--zip'):
                self.formats.append('zip')
            elif name in ('-g', '--gztar'):
                self.formats.append('gztar')
            elif name in ('-b', '--binary', '--egg'):
                self.formats.append('egg')
            elif name in ('-w', '--wheel'):
                self.formats.append('wheel')
            elif name in ('--trace',):          # undocumented
                os.environ['JARN_TRACE'] = '1'
            elif name in ('-c', '--config-file') and depth == 0:
                self.reset_defaults(expanduser(value))
                return self.parse_options(args, depth+1)

        return remaining_args
455120
function header(ctx) {
  var prefix = describe(ctx);
  var schema = transform.parameters(ctx.operation.spec, 'header');

  if (!schema) {
    debug(prefix + 'header middleware disabled (no schema)');
    return;
  }

  var env = ctx.operation.resource.api.env;
  var options = validateOptions(ctx.operation, 'header', true);

  // Create a list of headers to split on comma
  var allowMultiple = {};
  ctx.operation.spec.parameters.forEach(function(parameter) {
    if (parameter.paramType === 'header' && parameter.allowMultiple) {
      var name = parameter.name.toLowerCase();
      allowMultiple[name] = constants.singleHeaders.indexOf(name) < 0;
    }
  });

  schema = {
    type: 'object',
    properties: { header: schema },
    required: ['header'],
  };

  return function(req, res, next) {
    var header = lodash.cloneDeep(req.headers);

    // This only works for small subset of headers before Node v0.11
    lodash.forOwn(header, function(value, name) {
      if (allowMultiple[name]) header[name] = value.split(', ');
    });

    if (validate(res, env.validate(schema, { header: header }, options))) {
      req.sf.header = header;
      next();
    }
  };
}
1217438
function getSteps (props) {
  const { step, min, max, value, isRangeType, orientation } = props;

  const steps = [];
  const totalSteps = ((max - min) / step) + 1;

  for (let i = 0; i < totalSteps; i++) {
    let position = getPositionInPercentage(i * step, min, max);
    if (isVertical(orientation)) position = 100 - position;

    const style = { [constants[orientation].direction]: `${position}%` };

    const className = classNames('slider-step', {
      'slider-step-active': isInActiveRange(i * step, value, isRangeType)
    });
    steps.push(<span className={className} key={i} style={style} />);
  }
  return steps;
}
902437
function(depth, parts) {
                /*jshint -W083 */
                if (!depth) {
                    this.pushStackLiteral('data');
                } else {
                    this.pushStackLiteral('this.data(data, ' + depth + ')');
                }

                var len = parts.length;
                for (var i = 0; i < len; i++) {
                    this.replaceStack(function(current) {
                        return ' && ' + this.nameLookup(current, parts[i], 'data');
                    });
                }
            }
1033878
function AvatarList({ className, children, stacked }: Props): React.Node {
  const classes = cn(
    {
      "avatar-list": true,
      "avatar-list-stacked": stacked,
    },
    className
  );
  return <div className={classes}>{children}</div>;
}
143164
function sync(str, options) {
  var tmpl = this.cache(options) || this.cache(options, this.engine.compile(str, options));
  return tmpl(options);
}
828149
function formatValue(v,depth) {
    if (depth===undefined || depth===null) {
        depth=1;
    }
    var tp=typeof(v), val;
    if (v===null) {
        return "null";
    } else if (v===undefined) {
        return "undefined";
    } else if (tp==='object') {
        if (depth>0) {
            var properties=[];
            if (v.constructor===Array) {
                for (var i=0,sz=v.length;sz>i;i++) {
                    val=v[i];
                    if (typeof(val)==='string') {
                        properties.push(i+':"'+formatValue(val,depth-1)+'"');
                    } else {
                        properties.push(i+":"+formatValue(val,depth-1));
                    }
                }
                return "["+properties.join(", ")+"]";
            } else {
                var keys=[];
                for (var k in v) {
                    if (k.match(/^\+/)) {
                        // this is a meta-data property
                        continue;
                    }
                    keys.push(k);
                }
                // sort keys as IE 8 uses a different order than other browsers
                keys.sort(lexicalSort);

                for (var i=0,sz=keys.length;sz>i;i++) {
                    val=v[keys[i]];
                    if (typeof(val)==='string') {
                        properties.push(keys[i]+':"'+formatValue(val,depth-1)+'"');
                    } else {
                        properties.push(keys[i]+':'+formatValue(val,depth-1));
                    }
                }
                return "{"+properties.join(", ")+"}";
            }
        } else {
            if (v.constructor===Array) {
                return "Array["+v.length+"]";
            } else if (v.constructor===Function) {
                return "Function";
            } else {
                return "Object";
            }
        }
    } else if (tp==='function') {
        return "Function";
    } else {
        return ''+v;
    }
}
862127
function fetchSync (name, request, options) {
  if (!hasStartedInit) {
    throw new Error('initialise first with fetchSync.init()')
  }

  const isRequestOptionsCall = () => arguments.length === 2 &&
    (typeof arguments[0] === 'string' || arguments[0] instanceof Request) &&
    (typeof arguments[1] === 'object' && !(arguments[1] instanceof Request))

  if (arguments.length === 1) {
    request = name
    name = null
  } else if (isRequestOptionsCall()) {
    options = request
    request = name
    name = null
  }

  if (typeof request !== 'string' && !(request instanceof Request)) {
    throw new Error('expecting request to be a string or Request')
  } else if (options && typeof options !== 'object') {
    throw new Error('expecting options to be an object')
  }

  if (!hasBackgroundSyncSupport) {
    return fetch(request, options)
  }

  let sync = syncs.find((s) => s.id === name)

  if (sync) {
    const err = new Error(`sync operation already exists with name '${name}'`)
    return Promise.reject(err)
  }

  sync = syncUtil.createFromUserOptions({ name, request, options })

  syncs.push(sync)

  ready.promise
    .then(() => serialiseRequest(new Request(request, options)))
    .then((request) => { sync.request = request })
    .then(() => channel.send('REGISTER_SYNC', sync))

  return syncUtil.makePublicApi(sync)
}