I took that function from https://github.com/mozilla-services/loop-server/blob/master/loop/config.js#L34L43 so we should probably do it there to.