How to use the cozy-flags.reset function in cozy-flags

To help you get started, we’ve selected a few cozy-flags 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 cozy / cozy.github.io / en / cozy-banks / src / utils / flag.js View on Github external
const garbageCollectFlags = () => {
  const trueFlags = flag
    .list()
    .map(name => [name, flag(name)])
    .filter(x => x[1])
  flag.reset()
  for (const [flagName, flagValue] of trueFlags) {
    flag(flagName, flagValue)
  }
}

cozy-flags

Flag library used in Cozy

MIT
Latest version published 5 months ago

Package Health Score

66 / 100
Full package analysis