code: function realDomain(id) {
    return id.lastIndexOf("@") === 0 ? id.substr(1).toLowerCase() :
      id.toLowerCase().
        replace(/@/g, "-at-").
        replace(/\./g, "-dot-").
        replace(UUID_PATTERN, "$1");
  }
docs: eslint-disable-line max-len Copied from mozilla-central/addon-sdk/source/lib/sdk/bootstrap.js