Follow

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.

Install:

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

Use:

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

npmjs.com/package/@small-tech/

· · 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!