default-uid

Get the system default UID

Usage no npm install needed!

<script type="module">
  import defaultUid from 'https://cdn.skypack.dev/default-uid';
</script>

README

default-uid

Get the system default UID (User ID)

Install

$ npm install default-uid

Usage

import defaultUid from 'default-uid';

// On macOS
defaultUid();
//=> 501

defaultUid('linux');
//=> 1000

API

defaultUid(platform?)

platform

Type: string
Default: process.platform

One of the supported Node.js platforms.