mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 18:41:38 +01:00
12 lines
392 B
JavaScript
12 lines
392 B
JavaScript
function checkFeatureToggle (name) {
|
|
const queryPairMap = window.location.search.substr(1).split('&')
|
|
.map(pair => pair.split('='))
|
|
.reduce((pairs, [key, value]) => ({...pairs, [key]: value }), {})
|
|
const featureToggles = queryPairMap['ft'] ? queryPairMap['ft'].split(',') : []
|
|
return Boolean(featureToggles.find(ft => ft === name))
|
|
}
|
|
|
|
module.exports = {
|
|
checkFeatureToggle,
|
|
}
|