diff options
Diffstat (limited to 'node_modules/unique-temp-dir')
-rw-r--r-- | node_modules/unique-temp-dir/index.js | 25 | ||||
-rw-r--r-- | node_modules/unique-temp-dir/license | 21 | ||||
l--------- | node_modules/unique-temp-dir/node_modules/.bin/mkdirp | 1 | ||||
-rw-r--r-- | node_modules/unique-temp-dir/package.json | 40 | ||||
-rw-r--r-- | node_modules/unique-temp-dir/readme.md | 71 |
5 files changed, 0 insertions, 158 deletions
diff --git a/node_modules/unique-temp-dir/index.js b/node_modules/unique-temp-dir/index.js deleted file mode 100644 index bd4111b07..000000000 --- a/node_modules/unique-temp-dir/index.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; -var osTmpdir = require('os-tmpdir'); -var uid2 = require('uid2'); -var mkdirp = require('mkdirp'); -var path = require('path'); - -module.exports = function (options) { - options = options || {}; - var uniqueDir = path.join(osTmpdir(), uid2(options.length || 20)); - if (options.create) { - mkdirp.sync(uniqueDir); - } - if (options.thunk) { - return thunk(uniqueDir); - } - return uniqueDir; -}; - -function thunk(uniquedir) { - return function () { - var args = Array.prototype.slice.call(arguments); - args.unshift(uniquedir); - return path.join.apply(path, args); - }; -} diff --git a/node_modules/unique-temp-dir/license b/node_modules/unique-temp-dir/license deleted file mode 100644 index ad5d021ed..000000000 --- a/node_modules/unique-temp-dir/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage) - -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/unique-temp-dir/node_modules/.bin/mkdirp b/node_modules/unique-temp-dir/node_modules/.bin/mkdirp deleted file mode 120000 index 91a5f623f..000000000 --- a/node_modules/unique-temp-dir/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../../../mkdirp/bin/cmd.js
\ No newline at end of file diff --git a/node_modules/unique-temp-dir/package.json b/node_modules/unique-temp-dir/package.json deleted file mode 100644 index dfec1b47f..000000000 --- a/node_modules/unique-temp-dir/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "unique-temp-dir", - "version": "1.0.0", - "description": "Provides a uniquely named temp directory.", - "license": "MIT", - "repository": "jamestalmage/unique-temp-dir", - "author": { - "name": "James Talmage", - "email": "james@talmage.io", - "url": "github.com/jamestalmage" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "unique", - "temp", - "temporary", - "directory", - "dir", - "cross", - "platform", - "os" - ], - "dependencies": { - "mkdirp": "^0.5.1", - "os-tmpdir": "^1.0.1", - "uid2": "0.0.3" - }, - "devDependencies": { - "ava": "^0.8.0", - "xo": "^0.12.1" - } -} diff --git a/node_modules/unique-temp-dir/readme.md b/node_modules/unique-temp-dir/readme.md deleted file mode 100644 index 8b457703b..000000000 --- a/node_modules/unique-temp-dir/readme.md +++ /dev/null @@ -1,71 +0,0 @@ -# unique-temp-dir [](https://travis-ci.org/jamestalmage/unique-temp-dir) - -> Provides a uniquely named temp directory. - - -## Install - -``` -$ npm install --save unique-temp-dir -``` - - -## Usage - -```js -const uniqueTempDir = require('unique-temp-dir'); - -uniqueTempDir(); -//=> '/var/folders/2_/zg9h6_xd4r3_z7c07s0cn8mw0000gn/T/PpCfz55ANU2hdwnGzgny' - -uniqueTempDir(); -//=> '/var/folders/2_/zg9h6_xd4r3_z7c07s0cn8mw0000gn/T/qfqafhh1FJulehbCDAPk' -``` - - -## API - -### uniqueTempDir([options]) - -Returns a string that represents a unique directory inside the systems temp directory. - -#### options - -##### create - -Type: `boolean` -Default: `false` - -If `true`, the directory will be created synchronously before returning. - -##### length - -Type: `number` -Default: `20` - -The length of the directory name inside the temp directory. - -##### thunk - -Type: `boolean` -Default: `false` - -If true, returns a thunk function for `path.join(uniqueTempDir, ... additionalArgs)`. Useful for filling your directory up with stuff. - -```js -const uniqueTempDir = require('unique-temp-dir'); -const tempDir = uniqueTempDir({thunk: true}); - -tempDir() -//=> /user/temp/uniqueId - -tempDir('foo') -//=> /user/temp/uniqueId/foo - -tempDir('bar') -//=> /user/temp/uniqueId/bar -``` - -## License - -MIT © [James Talmage](http://github.com/jamestalmage) |