# device-file

> Device only file

Latest version **2.3.1** (published 2026-01-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install device-file
pnpm add device-file
yarn add device-file
bun add device-file
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.3.1 |
| Published | 2026-01-27 |
| First published | 2025-03-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Holepunch Inc |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/device-file
- Repository: https://github.com/holepunchto/device-file
- Issues: https://github.com/holepunchto/device-file/issues
- npm.io page: https://npm.io/package/device-file

## Dependencies (6)

- [b4a](https://npm.io/package/b4a.md) ^1.6.7
- [bare-fs](https://npm.io/package/bare-fs.md) ^4.0.1
- [fd-lock](https://npm.io/package/fd-lock.md) ^2.1.0
- [bare-path](https://npm.io/package/bare-path.md) ^3.0.0
- [ready-resource](https://npm.io/package/ready-resource.md) ^1.2.0
- [fs-native-extensions](https://npm.io/package/fs-native-extensions.md) ^1.4.0

## Recent versions

- 2.3.1 (latest) — 2026-01-27
- 2.3.0 — 2026-01-27
- 2.2.0 — 2026-01-21
- 2.1.3 — 2025-11-10
- 2.1.2 — 2025-11-10
- 2.1.1 — 2025-11-10
- 2.1.0 — 2025-11-10
- 2.0.7 — 2025-11-10
- 2.0.6 — 2025-11-08
- 2.0.5 — 2025-11-07
- 2.0.4 — 2025-11-07
- 2.0.3 — 2025-11-07
- 2.0.2 — 2025-11-06
- 2.0.1 — 2025-11-05
- 2.0.0 — 2025-10-29
- … 10 more at https://npm.io/package/device-file/versions

## README

# device-file

Device only file

```
npm install device-file
```

Stores some metadata about the device and complains if it thinks its been modified

## Usage

```js
const DeviceFile = require('device-file')

const d = new DeviceFile('DEVICE', { data: { appId: 'my-app-id' } })

// throws if DEVICE was modified or user data doesnt match or if it looks like an unsafe backup
await d.ready()
```

## License

Apache-2.0

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