$
This commit is contained in:
5
node_modules/unique-filename/LICENSE
generated
vendored
Normal file
5
node_modules/unique-filename/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
Copyright npm, Inc
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
34
node_modules/unique-filename/README.md
generated
vendored
Normal file
34
node_modules/unique-filename/README.md
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
unique-filename
|
||||
===============
|
||||
|
||||
Generate a unique filename for use in temporary directories or caches.
|
||||
|
||||
```js
|
||||
const uniqueFilename = require('unique-filename')
|
||||
|
||||
// returns something like: '/tmp/c5b28f47'
|
||||
const randomTmpfile = uniqueFilename(os.tmpdir())
|
||||
|
||||
// returns something like: '/tmp/my-test-51a7b48d'
|
||||
const randomPrefixedTmpfile = uniqueFilename(os.tmpdir(), 'my-test')
|
||||
|
||||
// returns something like: '/my-tmp-dir/testing-7ddd44c0'
|
||||
const uniqueTmpfile = uniqueFilename('/my-tmp-dir', 'testing', '/my/thing/to/uniq/on')
|
||||
```
|
||||
|
||||
### uniqueFilename(*dir*, *fileprefix*, *uniqstr*) → String
|
||||
|
||||
Returns the full path of a unique filename that looks like:
|
||||
`dir/prefix-7ddd44c0`
|
||||
or `dir/7ddd44c0`
|
||||
|
||||
*dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this.
|
||||
|
||||
*fileprefix* – A string to append prior to the unique part of the filename.
|
||||
The parameter is required if *uniqstr* is also passed in but is otherwise
|
||||
optional and can be `undefined`/`null`/`''`. If present and not empty
|
||||
then this string plus a hyphen are prepended to the unique part.
|
||||
|
||||
*uniqstr* – Optional, if not passed the unique part of the resulting
|
||||
filename will be random. If passed in it will be generated from this string
|
||||
in a reproducible way.
|
7
node_modules/unique-filename/lib/index.js
generated
vendored
Normal file
7
node_modules/unique-filename/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
var path = require('path')
|
||||
|
||||
var uniqueSlug = require('unique-slug')
|
||||
|
||||
module.exports = function (filepath, prefix, uniq) {
|
||||
return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq))
|
||||
}
|
48
node_modules/unique-filename/package.json
generated
vendored
Normal file
48
node_modules/unique-filename/package.json
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "unique-filename",
|
||||
"version": "2.0.1",
|
||||
"description": "Generate a unique filename for use in temporary directories or caches.",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"lint": "eslint \"**/*.js\"",
|
||||
"postlint": "template-oss-check",
|
||||
"template-oss-apply": "template-oss-apply --force",
|
||||
"lintfix": "npm run lint -- --fix",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"prepublishOnly": "git push origin --follow-tags",
|
||||
"snap": "tap",
|
||||
"posttest": "npm run lint"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/npm/unique-filename.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "GitHub Inc.",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/iarna/unique-filename/issues"
|
||||
},
|
||||
"homepage": "https://github.com/iarna/unique-filename",
|
||||
"devDependencies": {
|
||||
"@npmcli/eslint-config": "^3.1.0",
|
||||
"@npmcli/template-oss": "3.5.0",
|
||||
"tap": "^16.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"unique-slug": "^3.0.0"
|
||||
},
|
||||
"files": [
|
||||
"bin/",
|
||||
"lib/"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||
},
|
||||
"templateOSS": {
|
||||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
||||
"version": "3.5.0"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user