The wonderful thing about standards is that there are so many of them to choose from.
-- Andrew Tanenbaum
When it comes to storing application data, the convention on where to store your data varies from platform to platform.
This package is a port of the Python appdirs library, which provides a small set of methods which can be used to locate the preferred directories for user and site data for an application.
It currently supports OS X and Unix operating systems (Unix support is according to the XDG specification). Windows support is not yet implemented, but a pull request adding that would be greatly appreciated!
AppDirs.js is hosted on NPM, so you can simply install it, and add
it to your
package.json as a dependency.
$ npm install --save appdirs
The directories the AppDirs.js can help you locate are:
See the JSDocs for specifics on using the API.