How to use the just-flatten-it function in just-flatten-it

To help you get started, we’ve selected a few just-flatten-it 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 imyelo / pokequest-wiki / src / data / index.js View on Github external
]

  let result = groups.map(({ key, dishes }) => dishes.map((dish) => pokemon.dishWeight[key].map((value, index) => {
    if (!value) {
      return
    }
    return {
      id: dish.id,
      name: dish.name,
      logo: dish.logo,
      quality: QUALITIES[index],
      weight: +value,
    }
  })))

  result = flatten(result).filter(Boolean)

  return {
    ...pokemon,
    dishes: result,
  }
})
github ritz078 / embed-js / packages / embed-plugin-noembed / src / noembed-regex.js View on Github external
export default function getRegexes(excludeServices = []) {
  const includedRegexes = regexes.filter(
    r => excludeServices.indexOf(r.name.toLowerCase()) === -1
  )
  const patterns = flatten(pluck(includedRegexes, "patterns"))
  return new RegExp(patterns.join("|"), "gi")
}

just-flatten-it

return a flattened array

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis

Popular just-flatten-it functions