File size: 988 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
ospath
======
[](https://www.npmjs.org/package/ospath)
[](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
|