Socket
Socket
Sign inDemoInstall

env-paths

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-paths

Get paths for storing things like data, config, cache, etc


Version published
Weekly downloads
18M
increased by4.39%
Maintainers
1
Weekly downloads
 
Created

What is env-paths?

The env-paths npm package is used to generate paths for storing things like data, config, cache, etc., in a way that complies with the operating system's conventions. It is useful for developers who want to ensure their applications follow the best practices for file storage locations on different platforms.

What are env-paths's main functionalities?

Config Paths

Generates paths for storing configuration files. The 'config' property will provide a path that is suitable for the user's operating system.

{"config": require('env-paths')('MyApp').config}

Data Paths

Generates paths for storing data files. The 'data' property will give a path that is appropriate for the user's operating system.

{"data": require('env-paths')('MyApp').data}

Cache Paths

Generates paths for storing cache files. The 'cache' property will provide a path that is suitable for the user's operating system.

{"cache": require('env-paths')('MyApp').cache}

Log Paths

Generates paths for storing log files. The 'log' property will give a path that is appropriate for the user's operating system.

{"log": require('env-paths')('MyApp').log}

Temporary Paths

Generates paths for storing temporary files. The 'temp' property will provide a path that is suitable for the user's operating system.

{"temp": require('env-paths')('MyApp').temp}

Other packages similar to env-paths

Keywords

FAQs

Package last updated on 27 Aug 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc