New npm module: @small-tech/cross-platform-hostname

Attempts to bring Windows 10 in line with hostname conventions in Linux/macOS. Set your primary DNS suffix and this module will return your full computer name (which can be a valid domain name as under Linux/macOS) instead of just your computer name.


npm i @small-tech/cross-platform-hostname


const hostname = require('@small-tech/cross-platform-hostname')
console.log(`Your hostname is: ${hostname}`)

· · Web · 0 · 2 · 1
Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!