@blossm/command-info-from-req

Finds the command name, domain, and service from the hostname of a request.

Usage no npm install needed!

<script type="module">
  import blossmCommandInfoFromReq from 'https://cdn.skypack.dev/@blossm/command-info-from-req';
</script>

README

Finds the command name from the hostname of a request. For instance, the command name for change-account-email.command.domain.io is change-account-email. The command subdomain must be a part of the host.