node-unique-machine-id
**Get the unique machine id (cross-platform, without admin privileges)**
Last updated 6 years ago by zenghongtu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-unique-machine-id 
SYNC missed versions from official npm registry.

node-unique-machine-id

Get the unique machine id (cross-platform, without admin privileges)

Installation

npm install node-unique-machine-id

Usage

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

// or async... await...
machineId().then(id => {
  console.log(id);
  //=> e7da09af80e39cd1b2af442ce529f90d5f607ed626a31e869ac48c6a6148b4a3
});

const id = machineIdSync(true);
console.log(id);
//=> 98912984-c4e9-5ceb-8000-03882a0485e4

API

machineId(original?:boolean, fallthrough?: boolean)

machineIdSync(original?:boolean, fallthrough?: boolean)

original: default: false. If true return original value of machine id, otherwise return hashed value (sha-256)

fallthrough: default: false. If true, uuid will be generated and saved when there is an error in obtaining (use for Unsupported platforms)

Thanks

Current Tags

  • 1.1.0                                ...           latest (6 years ago)

3 Versions

  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |