/ archiveofbelonging.org / back / node_modules / node-machine-id /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]dist/2 years ago -  
[DIR]tests/2 years ago -  
[DIR]types/2 years ago -  
[   ]LICENSE39 years ago1.1K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[TXT]README.md39 years ago3.1Kf12eb36 documentaiton updates [كارل مبارك]
[   ]index.js39 years ago2.7K 
[   ]package.json2 years ago3.3K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[   ]webpack.config.babel.js39 years ago1.5K 
README.md

Cross-platform unique machine (desktop) id discovery

Use cases

Features

How it works

Module based on OS native UUID/GUID which used for internal needs.

All others approaches requires elevated rights or much depends on hardware components, but this approach summarize the methods of selecting the most reliable unique identifier

Installation

npm install node-machine-id

Usage

Function: machineId(original)

Function: machineIdSync(original);

import {machineId, machineIdSync} from 'node-machine-id';

// Asyncronous call with async/await or Promise

async function getMachineId() {
    let id = await machineId();
    ...
}

machineId().then((id) => {
    ...
})

// Syncronous call

let id = machineIdSync()
// id = c24b0fe51856497eebb6a2bfcd120247aac0d6334d670bb92e09a00ce8169365
let id = machineIdSync({original: true})
// id = 98912984-c4e9-5ceb-8000-03882a0485e4

Caveats

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80