better-hostname

Export the machine hostname or 'browser' when used with Browserify

Usage no npm install needed!

<script type="module">
  import betterHostname from 'https://cdn.skypack.dev/better-hostname';
</script>

README

better-hostname Build Status

Export the machine hostname or 'browser' when used with Browserify.

Installation

npm install --save better-hostname

Usage

var hostname = require('better-hostname');

console.log(hostname);

In case you use Browserify, this module exports the 'browser' string.

License

MIT