{"name":"unique-filename","version":"6.0.0","keywords":[],"author":{"name":"GitHub Inc."},"license":"ISC","_id":"unique-filename@6.0.0","maintainers":[{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},{"name":"reggi","email":"reggi@github.com"},{"name":"owlstronaut","email":"owlstronaut@github.com"}],"homepage":"https://github.com/iarna/unique-filename","bugs":{"url":"https://github.com/iarna/unique-filename/issues"},"dist":{"shasum":"46c05685eb621f5ce60f7247b17775eef4d4f6b4","tarball":"http://registry-npm.ywwl.com/unique-filename/download/unique-filename-6.0.0.tgz","fileCount":4,"integrity":"sha512-+qvgf+JZJq/E12q/bNHRxUWCm8p5WgaySMON3A+LvbXFf7LH76fB8fU5/pq1ZjiwFN9GSFDFvSPB03+lKDWiiQ==","signatures":[{"sig":"MEUCIQCzTZfrik9CGRwAkRDul6yULHbpHnfVBlizzagJCduKzAIgb1sx4+QFtOsn85s04MNZD+29+pXYzzow9wp3mgoNdu8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/unique-filename@6.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3744,"size":1927,"noattachment":false,"key":"/unique-filename/-/unique-filename-6.0.0.tgz"},"main":"lib/index.js","engines":{"node":"^22.22.2 || ^24.15.0 || >=26.0.0"},"gitHead":"786d22e7a3583417ff10907f15da2c6c1ecf361b","scripts":{"lint":"npm run eslint","snap":"node --test --test-update-snapshots './test/**/*.js'","test":"node --test './test/**/*.js'","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","lintfix":"npm run eslint -- --fix","postlint":"template-oss-check","posttest":"npm run lint","test:cover":"node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js'","test:node20":"node --test test","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.14.1","description":"Generate a unique filename for use in temporary directories or caches.","directories":{},"templateOSS":{"publish":true,"version":"5.1.0","testRunner":"node:test","latestCiVersion":24,"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"26.1.0","dependencies":{"unique-slug":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@npmcli/template-oss":"5.1.0","@npmcli/eslint-config":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/unique-filename_6.0.0_1778870921140_0.891690526932355","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":1778870921292,"_cnpm_publish_time":1778870921292,"dist-tags":{"latest":"6.0.0"}}