1.2.0 • Published 11 months ago

@dcl/feature-flags v1.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

Feature flags lib

This library is intended to work in Webapps, client side. With better results when you use it with userId. Although it is not required for on-off features.

Check out the playbook: https://playbooks.decentraland.systems/ops/feature-flags.html

npm i -S @dcl/feature-flags

import { fetchFlags } from '@dcl/feature-flags'

const featureFlags = await fetchFlags({
  applicationName: 'explorer',
  // optional:
  userId: '0xETH_ADDRESS_MAYBE?'
})

if (featureFlags.flags['new-ui']) {
  // do something
}