How to use the clean-deep function in clean-deep

To help you get started, we’ve selected a few clean-deep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nasa / earthdata-search / static / src / js / util / url / url.js View on Github external
export const stringify = params => qs.stringify(
  cleanDeep(params, { emptyObjects: false, undefinedValues: false }),
  {
    addQueryPrefix: true,
    encoder: str => str.toString().replace(/ /g, '%20').replace(/,/g, '%2C').replace(/:/g, '%3A')
  }
)
github nasa / earthdata-search / static / src / js / util / url / url.js View on Github external
export const stringify = params => qs.stringify(
  cleanDeep(params, { emptyObjects: false, undefinedValues: false }),
  {
    addQueryPrefix: true,
    encoder: str => str.toString().replace(/ /g, '%20').replace(/,/g, '%2C').replace(/:/g, '%3A')
  }
)
github elrumordelaluz / svgson-next / src / tools.js View on Github external
export const applyCompat = node => {
  const renamed = rename(node, key => {
    if (key === 'attributes') {
      return 'attrs'
    }
    if (key === 'children') {
      return 'childs'
    }
    return key
  })
  return omitDeep(clean(renamed), ['type'])
}

clean-deep

Remove falsy, empty or nullable values from objects

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis

Popular clean-deep functions