persist-path

Get OS-specific path to store persistent data

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
persist-path
1001.0.26 years ago7 years agoMinified + gzip package size for persist-path in KB

Readme

persist-path
NPM version Dependency Status XO code style !Licensemit-badgemit-url
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/settings

macOS

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

Windows

If you supply an argument to the required function call this will be appended on Users %appdata% dir
License
MIT (c) 2016 Sebastian Raff