Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const slug = splitted[0]
const domain = splitted.slice(1).join('.')
const rx = new RegExp(slug + '.*' + domain.replace('.', '\\.'))
return rx.exec(location)
}
const isDemoCozy = () => {
const location = window.location.href
return some(demoFqdns.map(fqdn => locationMatchesFqdn(location, fqdn)))
}
if (isDemoCozy()) {
flag('demo', true)
}
Figure.defaultProps = Object.assign({}, Figure.defaultProps, {
blurred: flag('amount_blur') ? true : false
})
flag.store.on('change', function(flagName) {
if (flagName == 'amount_blur') {
Figure.defaultProps.blurred = flag('amount_blur')
}
})
window.flag = flag
flag.store.on('change', function(flagName) {
if (flagName == 'amount_blur') {
Figure.defaultProps.blurred = flag('amount_blur')
}
})