# default-uid

> Get the system default UID

Latest version **2.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install default-uid
pnpm add default-uid
yarn add default-uid
bun add default-uid
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-05-03 |
| First published | 2015-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus, silverwind |
| Keywords | uid, user, id, identifier, platform, os, default |

## Links

- npm: https://www.npmjs.com/package/default-uid
- Repository: https://github.com/sindresorhus/default-uid
- Homepage: https://github.com/sindresorhus/default-uid#readme
- Issues: https://github.com/sindresorhus/default-uid/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/default-uid

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-05-03
- 1.0.0 — 2015-01-07

## README

# default-uid

> Get the system default [UID *(User ID)*](http://www.linfo.org/uid.html)

## Install

```
$ npm install default-uid
```

## Usage

```js
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](https://nodejs.org/api/process.html#process_process_platform).

---
_Source: https://npm.io/package/default-uid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
