UNPKG

@koopjs/featureserver

Version:

*An open source implementation of the GeoServices specification*

18 lines (13 loc) 411 B
const _ = require('lodash'); function combineBodyQueryParameters(body, query) { const definedQueryParams = _.pickBy(query, isNotEmptyString); const definedBodyParams = _.pickBy(body, isNotEmptyString); return { ...definedBodyParams, ...definedQueryParams, }; } function isNotEmptyString(str) { return !_.isString(str) || !_.isEmpty(str); } module.exports = { combineBodyQueryParameters };