Package Exports
- persist-path
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (persist-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
persist-path
Get OS-specific path to store persistent data
Usage
npm install persist-path
var ppath = require('persist-path')();OS-specific Paths
Linux/BSD
If you supply an argument to the required function call this will be appended as .dot directory.
Example:
var ppath = require('persist-path')('myproject/settings');
console.log(ppath); // /home/<username>/.myproject/settingsmacOS
If you supply an argument to the required function call this will be appended on Library/Preferences in the Users home
Example:
var ppath = require('persist-path')('myproject/settings');
console.log(ppath); // /Users/<username>/Library/Preferences/myproject/settingsWindows
If you supply an argument to the required function call this will be appended on Users %appdata% dir
License
MIT (c) 2016 Sebastian Raff