Socket
Socket
Sign inDemoInstall

persist-path

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    persist-path

Get OS-specific path to store persistent data


Version published
Weekly downloads
1.1K
decreased by-34.94%
Maintainers
1
Install size
4.68 kB
Created
Weekly downloads
 

Readme

Source

persist-path

NPM version Dependency Status XO code style License

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

Keywords

FAQs

Last updated on 12 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc