A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/lib/feature-toggle-utils.js

11 lines
392 B

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,
}