/hardwareid

Return the computer serial number, along with username, platform and hardware architecture

Primary LanguageJavaScriptMIT LicenseMIT

HardwareId

Return the computer serial number, along with username, platform and hardware architecture

Works on Mac, Windows, Linux, FreeBSD

Install

npm i hardwareid

Usage

import hardwareid from "hardwareid"

let sn = await hardwareid()
console.log(sn)

This outputs:

{
  username: 'SomeUsername',
  serial: 'ABCDEFGH12345',
  platform: 'darwin',
  arch: 'x64'
}

Credit

@bresnow