Get OS-specific path to store persistent data
npm install persist-path
var ppath = require('persist-path')();
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/settings
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/settings
If you supply an argument to the required function call this will be appended on Users %appdata% dir
MIT (c) 2016 Sebastian Raff