src/util.js
/**
 * strips param object of everything save headers!
 *
 * @param {string} query the content read from a query file
 * @param {object} params query parameters, that are inserted into query
 */
strips param object of everything save headers.
@param {string} query the content read from a query file
@param {object} params query parameters, that are inserted into query
strips param object of everything save headers . @param { string } query the content read from a query file @param { object } params query parameters that are inserted into query
function cleanHeaderParams(query, params, rmvQueryParams = false) {
  return Object.keys(params)
    .filter((key) => rmvQueryParams !== (query.match(new RegExp(`\\@${key}`, 'g')) != null))
    .filter((key) => key !== 'description')
    .reduce((cleanObj, key) => {
      cleanObj[key] = params[key];
      return cleanObj;
    }, {});
}
function cleanHeaderParams ( query , params , rmvQueryParams = false ) { return Object . keys ( params ) . filter ( ( key ) => rmvQueryParams !== ( query . match ( new RegExp ( ` \\ ${ key } ` , 'g' ) ) != null ) ) . filter ( ( key ) => key !== 'description' ) . reduce ( ( cleanObj , key ) => { cleanObj [ key ] = params [ key ] ; return cleanObj ; } , { } ) ; }
strips param object of everything save headers!
strips param object of everything save headers!
// eslint-disable-next-line no-param-reassign