# user-settings-dir

> Gets the directory to use for application settings for a user on different operating systems

Latest version **0.0.3** (published 2015-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install user-settings-dir
pnpm add user-settings-dir
yarn add user-settings-dir
bun add user-settings-dir
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-04-22 |
| First published | 2015-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maximiliano Korp |
| Maintainers | maxkorp |

## Links

- npm: https://www.npmjs.com/package/user-settings-dir
- Repository: https://github.com/maxkorp/user-settings-dir
- Issues: https://github.com/maxkorp/user-settings-dir/issues
- npm.io page: https://npm.io/package/user-settings-dir

## Recent versions

- 0.0.3 (latest) — 2015-04-22
- 0.0.2 — 2015-03-25
- 0.0.1 — 2015-03-25

## README

## user-settings-dir

user-settings-dir is a small library to find the directory to persist application settings for a user. Many node-ish applications store settings properly on *nixy OSes using a dotfile (or dotdirectory) in the user's home folder. On Windows however, they tend to store files incorrectly, in the user's home directory, rather than in appdata. The officially sanctioned place in windows is in %APPDATA%,

On Vista and newer, by default they evaluate like this:
  - `%USERPROFILE%` (wrong): `C:\Users\{UserName}\`
  - `%APPDATA%` (right): `C:\Users\{UserName}\AppData\Roaming`

On XP:
  - `%USERPROFILE%` (wrong): `C:\Documents and Settings\{UserName}\`
  - `%APPDATA%` (right): `C:\Documents and Settings\{UserName}\Application Data\`

In addition to being formally correct (and necessary if you ever want to get something Microsoft certified), this is just cleaner. I'm a neat-freak, and I like to keep my directories clean. Much as you hide settings in dotfiles in *nixy systems, those settings are meant to be hidden in AppData on windows systems. I'm hoping that making this module available might help prod at least a few people in the right direction, when making cross platform node applications.

### notes
This module was based off of https://github.com/sindresorhus/user-home so thank him, really.

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