Feature switches in JavaScript