{"name":"unique-filename","version":"5.0.0","keywords":[],"author":{"name":"GitHub Inc."},"license":"ISC","_id":"unique-filename@5.0.0","maintainers":[{"name":"gar","email":"gar+npm@danger.computer"},{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},{"name":"reggi","email":"reggi@github.com"},{"name":"hashtagchris","email":"hashtagchris@github.com"},{"name":"owlstronaut","email":"owlstronaut@github.com"}],"homepage":"https://github.com/iarna/unique-filename","bugs":{"url":"https://github.com/iarna/unique-filename/issues"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"dist":{"shasum":"8b17bbde1a7ca322dd1a1d23fe17c2b798c43f8f","tarball":"http://registry-npm.ywwl.com/unique-filename/download/unique-filename-5.0.0.tgz","fileCount":4,"integrity":"sha512-2RaJTAvAb4owyjllTfXzFClJ7WsGxlykkPvCr9pA//LD9goVq+m4PPAeBgNodGZ7nSrntT/auWpJ6Y5IFXcfjg==","signatures":[{"sig":"MEQCIEfSDHEXouB82UApXYpOXZed93+pl0/q39/IhACfU28yAiBgsIBmGNDodaOTWYtD7snSuQxUCMqFh5+cKzHQqCqDIQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/unique-filename@5.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3484,"size":1856,"noattachment":false,"key":"/unique-filename/-/unique-filename-5.0.0.tgz"},"main":"lib/index.js","engines":{"node":"^20.17.0 || >=22.9.0"},"gitHead":"158a33be82fa87da84224168a383b8afb1948166","scripts":{"lint":"npm run eslint","snap":"tap","test":"tap","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","lintfix":"npm run eslint -- --fix","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bf2882fa-84ac-4eae-813a-1bfe0323f161"}},"repository":{"url":"git+https://github.com/npm/unique-filename.git","type":"git"},"_npmVersion":"11.6.2","description":"Generate a unique filename for use in temporary directories or caches.","directories":{},"templateOSS":{"publish":true,"version":"4.27.1","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"22.20.0","dependencies":{"unique-slug":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","@npmcli/template-oss":"4.27.1","@npmcli/eslint-config":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/unique-filename_5.0.0_1761165223599_0.2452000751818484","host":"s3://npm-registry-packages-npm-production"},"readme":"unique-filename\n===============\n\nGenerate a unique filename for use in temporary directories or caches.\n\n```js\nconst uniqueFilename = require('unique-filename')\n\n// returns something like: '/tmp/c5b28f47'\nconst randomTmpfile = uniqueFilename(os.tmpdir())\n\n// returns something like: '/tmp/my-test-51a7b48d'\nconst randomPrefixedTmpfile = uniqueFilename(os.tmpdir(), 'my-test')\n\n// returns something like: '/my-tmp-dir/testing-7ddd44c0'\nconst uniqueTmpfile = uniqueFilename('/my-tmp-dir', 'testing', '/my/thing/to/uniq/on')\n```\n\n### uniqueFilename(*dir*, *fileprefix*, *uniqstr*) → String\n\nReturns the full path of a unique filename that looks like:\n`dir/prefix-7ddd44c0`\nor `dir/7ddd44c0`\n\n*dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this.\n\n*fileprefix* – A string to append prior to the unique part of the filename.\nThe parameter is required if *uniqstr* is also passed in but is otherwise\noptional and can be `undefined`/`null`/`''`. If present and not empty\nthen this string plus a hyphen are prepended to the unique part.\n\n*uniqstr* – Optional, if not passed the unique part of the resulting\nfilename will be random.  If passed in it will be generated from this string\nin a reproducible way.\n","publish_time":1761165223797,"_cnpm_publish_time":1761165223797,"dist-tags":{"latest":"6.0.0"}}