unique-filename
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "unique-filename", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Generate a unique filename for use in temporary directories or caches.", | ||
@@ -21,8 +21,8 @@ "main": "index.js", | ||
"devDependencies": { | ||
"standard": "^3.7.3", | ||
"tap": "^1.0.0" | ||
"standard": "^5.4.1", | ||
"tap": "^2.3.1" | ||
}, | ||
"dependencies": { | ||
"unique-slug": "^1.0.0" | ||
"unique-slug": "^2.0.0" | ||
} | ||
} |
@@ -21,4 +21,4 @@ unique-filename | ||
Returns the full path of a unique filename that looks like: | ||
`dir/prefix-912ec803b2ce49e4a541068d495ab570` | ||
or `dir/912ec803b2ce49e4a541068d495ab570` | ||
`dir/prefix-7ddd44c0` | ||
or `dir/7ddd44c0` | ||
@@ -25,0 +25,0 @@ *dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this. |
@@ -8,3 +8,3 @@ 'sue strict' | ||
var randomTmpfile = uniqueFilename('tmp') | ||
t.like(randomTmpfile, /^tmp.[a-f0-9]{32}$/, 'random tmp file') | ||
t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file') | ||
@@ -15,3 +15,3 @@ var randomAgain = uniqueFilename('tmp') | ||
var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test') | ||
t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{32}$/, 'random prefixed tmp file') | ||
t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file') | ||
@@ -22,5 +22,5 @@ var randomPrefixedAgain = uniqueFilename('tmp', 'my-test') | ||
var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') | ||
t.like(uniqueTmpfile, /^tmp.testing-dd1ecbb112056bb8a7347e852ce3ddf9$/, 'unique filename') | ||
t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename') | ||
var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') | ||
t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41987
16
405
1
+ Addedimurmurhash@0.1.4(transitive)
+ Addedunique-slug@2.0.2(transitive)
- Removedunique-slug@1.0.0(transitive)
Updatedunique-slug@^2.0.0