diff options
Diffstat (limited to 'node_modules/home-or-tmp')
-rw-r--r-- | node_modules/home-or-tmp/index.js | 5 | ||||
-rw-r--r-- | node_modules/home-or-tmp/license | 21 | ||||
-rw-r--r-- | node_modules/home-or-tmp/package.json | 43 | ||||
-rw-r--r-- | node_modules/home-or-tmp/readme.md | 32 |
4 files changed, 101 insertions, 0 deletions
diff --git a/node_modules/home-or-tmp/index.js b/node_modules/home-or-tmp/index.js new file mode 100644 index 000000000..bb67e9bcb --- /dev/null +++ b/node_modules/home-or-tmp/index.js @@ -0,0 +1,5 @@ +'use strict'; +var osHomedir = require('os-homedir'); +var osTmpdir = require('os-tmpdir'); + +module.exports = osHomedir() || osTmpdir(); diff --git a/node_modules/home-or-tmp/license b/node_modules/home-or-tmp/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/home-or-tmp/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/home-or-tmp/package.json b/node_modules/home-or-tmp/package.json new file mode 100644 index 000000000..5926f323c --- /dev/null +++ b/node_modules/home-or-tmp/package.json @@ -0,0 +1,43 @@ +{ + "name": "home-or-tmp", + "version": "2.0.0", + "description": "Get the user home directory with fallback to the system temp directory", + "license": "MIT", + "repository": "sindresorhus/home-or-tmp", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "user", + "home", + "homedir", + "dir", + "directory", + "folder", + "path", + "tmp", + "temp", + "temporary", + "fallback", + "graceful", + "userprofile" + ], + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + }, + "devDependencies": { + "ava": "0.0.4" + } +} diff --git a/node_modules/home-or-tmp/readme.md b/node_modules/home-or-tmp/readme.md new file mode 100644 index 000000000..13ca69761 --- /dev/null +++ b/node_modules/home-or-tmp/readme.md @@ -0,0 +1,32 @@ +# home-or-tmp [](https://travis-ci.org/sindresorhus/home-or-tmp) + +> Get the user home directory with fallback to the system temp directory + +Useful in cases where the home directory either isn't set or doesn't exist. + + +## Install + +``` +$ npm install --save home-or-tmp +``` + + +## Usage + +```js +var homeOrTmp = require('home-or-tmp'); + +console.log(homeOrTmp); +//=> '/Users/sindresorhus' + +// and if there's no home directory: + +console.log(homeOrTmp); +//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) |