Works on Mac, Windows, Linux, FreeBSD
npm i hardwareid
import hardwareid from "hardwareid"
let sn = await hardwareid()
console.log(sn)
This outputs:
{
username: 'SomeUsername',
serial: 'ABCDEFGH12345',
platform: 'darwin',
arch: 'x64'
}
Return the computer serial number, along with username, platform and hardware architecture
JavaScriptMIT
Works on Mac, Windows, Linux, FreeBSD
npm i hardwareid
import hardwareid from "hardwareid"
let sn = await hardwareid()
console.log(sn)
This outputs:
{
username: 'SomeUsername',
serial: 'ABCDEFGH12345',
platform: 'darwin',
arch: 'x64'
}