lib/model/modelQueryProps.js
function splitQueryProps(model, json) {
  const keys = Object.keys(json);

  if (hasQueryProps(json, keys)) {
    const queryProps = {};
    const modelProps = {};

    for (let i = 0, l = keys.length; i < l; ++i) {
      const key = keys[i];
      const value = json[key];

      if (isQueryProp(value)) {
        queryProps[key] = value;
      } else {
        modelProps[key] = value;
      }
    }

    defineNonEnumerableProperty(model, QUERY_PROPS_PROPERTY, queryProps);

    return modelProps;
  } else {
    return json;
  }
}
function splitQueryProps(model, json) {
  const keys = Object.keys(json);

  if (hasQueryProps(json, keys)) {
    const queryProps = {};
    const modelProps = {};

    for (let i = 0, l = keys.length; i < l; ++i) {
      const key = keys[i];
      const value = json[key];

      if (isQueryProp(value)) {
        queryProps[key] = value;
      } else {
        modelProps[key] = value;
      }
    }

    defineNonEnumerableProperty(model, QUERY_PROPS_PROPERTY, queryProps);

    return modelProps;
  } else {
    return json;
  }
}
function splitQueryProps ( model , json ) { const keys = Object . keys ( json ) ; if ( hasQueryProps ( json , keys ) ) { const queryProps = { } ; const modelProps = { } ; for ( let i = 0 , l = keys . length ; i < l ; ++ i ) { const key = keys [ i ] ; const value = json [ key ] ; if ( isQueryProp ( value ) ) { queryProps [ key ] = value ; } else { modelProps [ key ] = value ; } } defineNonEnumerableProperty ( model , QUERY_PROPS_PROPERTY , queryProps ) ; return modelProps ; } else { return json ; } }
Removes query properties from `json` and stores them into a hidden property inside `model` so that they can be later merged back to `json`.
Removes query properties from json and stores them into a hidden property inside model so that they can be later merged back to json .