# ospath

> Operating system specific paths.

Latest version **1.2.2** (published 2016-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install ospath
pnpm add ospath
yarn add ospath
bun add ospath
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2016-09-07 |
| First published | 2015-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/ospath) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | JP Richardson |
| Maintainers | jprichardson |
| Keywords | home, data, dir, directory, path, tmp, temp, windows, linux, darwin, mac |

## Links

- npm: https://www.npmjs.com/package/ospath
- Repository: https://github.com/jprichardson/ospath
- Homepage: https://github.com/jprichardson/ospath#readme
- Issues: https://github.com/jprichardson/ospath/issues
- npm.io page: https://npm.io/package/ospath

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.2.2 (latest) — 2016-09-07
- 1.2.0 — 2016-09-06
- 1.1.0 — 2015-06-17
- 1.0.2 — 2015-06-16
- 1.0.1 — 2015-06-16
- 1.0.0 — 2015-06-16

## README

ospath
======

[![npm Package](https://img.shields.io/npm/v/ospath.svg?style=flat-square)](https://www.npmjs.org/package/ospath)
[![build status](https://api.travis-ci.org/jprichardson/ospath.svg)](http://travis-ci.org/jprichardson/ospath)

A JavaScript component that provides operating specific path values.


Installation
------------

    npm i --save ospath


API
---

### ospath.data()

Returns the directory where an application should store its data directory.

- **Windows**: `%APPDATA%`
- **OS X**: `~/Library/Application Support`
- **Unix-like**: `$XDG_CONFIG_HOME` or `~/.config`


### ospath.desktop()

Returns the users desktop directory. On every OS, this is just the `home()`
dir and `Desktop`.


### ospath.home()

Returns the user's home directory.

- **Windows**: `%USERPROFILE%`
- **Unix-like**: `$HOME`


### ospath.tmp()

Returns a temporary directory. Could also use `require('os').tmpdir()`.

- **Windows**: `%TEMP%`
- **Unix-like**: `/tmp`


License
-------

MIT

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