preact-material-components
Version:
preact wrapper for "Material Components for the web"
53 lines (32 loc) • 1.43 kB
Markdown
[](http://badge.fury.io/js/persist-path)
[](https://gemnasium.com/github.com/hobbyquaker/persist-path)
[](https://github.com/sindresorhus/xo)
[![License][mit-badge]][mit-url]
> Get OS-specific path to store persistent data
```npm install persist-path```
```Javascript
var ppath = require('persist-path')();
```
If you supply an argument to the required function call this will be appended as .dot directory.
Example:
```Javascript
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:
```Javascript
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](https://github.com/hobbyquaker)
[]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat
[]: LICENSE