{"_id":"tempfile","_rev":"4142096","name":"tempfile","description":"Get a random temporary file path","dist-tags":{"latest":"6.0.1"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-03-01T19:26:48.000Z","created":"2013-12-31T23:07:18.013Z","6.0.1":"2026-01-25T07:56:47.802Z","6.0.0":"2026-01-23T17:55:21.239Z","5.0.0":"2023-02-12T06:34:26.215Z","4.0.0":"2021-06-08T07:32:45.909Z","3.0.0":"2019-04-28T15:13:39.592Z","2.0.0":"2017-03-28T16:12:01.231Z","1.1.1":"2015-05-07T19:45:59.388Z","1.1.0":"2014-10-03T14:27:11.242Z","1.0.0":"2014-08-13T16:26:59.131Z","0.1.3":"2014-03-26T21:17:26.561Z","0.1.2":"2014-01-01T00:31:46.210Z","0.1.1":"2013-12-31T23:18:42.792Z","0.1.0":"2013-12-31T23:07:18.013Z"},"users":{"derothenbergiii":true,"seangenabe":true,"rocket0191":true,"adius":true,"daskepon":true,"losymear":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"versions":{"6.0.1":{"name":"tempfile","version":"6.0.1","description":"Get a random temporary file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["temp","temporary","tempfile","file","path","random","uuid"],"dependencies":{"is-safe-filename":"^0.1.1","temp-dir":"^3.0.0"},"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"ac7a2bb839ceb765d8030aa2356d6830590a38ef","types":"./index.d.ts","_id":"tempfile@6.0.1","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"shasum":"9e0f530aae237660cadfb111c7374c66f39b3927","size":1915,"noattachment":false,"key":"/tempfile/-/tempfile-6.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-6.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tempfile_6.0.1_1769327807654_0.33572951445221433"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-25T07:56:47.802Z","publish_time":1769327807802,"_source_registry_name":"default","_cnpm_publish_time":1769327807802},"6.0.0":{"name":"tempfile","version":"6.0.0","description":"Get a random temporary file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["temp","temporary","tempfile","file","path","random","uuid"],"dependencies":{"temp-dir":"^3.0.0"},"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"f653871e1dff3f8bbe856fd5ca87c20f61abbcee","types":"./index.d.ts","_id":"tempfile@6.0.0","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"shasum":"ced9bb9752ede62b9437a6c851933ac924630bf8","size":1884,"noattachment":false,"key":"/tempfile/-/tempfile-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tempfile_6.0.0_1769190921091_0.8535501647048598"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-23T17:55:21.239Z","publish_time":1769190921239,"_source_registry_name":"default","_cnpm_publish_time":1769190921239},"5.0.0":{"name":"tempfile","version":"5.0.0","description":"Get a random temporary file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=14.18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["temp","temporary","tempfile","file","path","random","uuid"],"dependencies":{"temp-dir":"^3.0.0"},"devDependencies":{"ava":"^5.2.0","tsd":"^0.25.0","xo":"^0.53.1"},"types":"./index.d.ts","gitHead":"970480298c2122f2db52d9635f2ce1c6ed8635cd","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_id":"tempfile@5.0.0","_nodeVersion":"14.21.1","_npmVersion":"9.2.0","dist":{"shasum":"40c141e441709fe2d9c17c138e81d4c33fbc9e03","size":1933,"noattachment":false,"key":"/tempfile/-/tempfile-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tempfile_5.0.0_1676183666035_0.8003368199720127"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-12T06:34:26.215Z","publish_time":1676183666215,"_cnpm_publish_time":1676183666215},"4.0.0":{"name":"tempfile","version":"4.0.0","description":"Get a random temporary file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12.20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["temp","temporary","tempfile","file","path","random","uuid"],"dependencies":{"temp-dir":"^2.0.0","uuid":"^8.3.2"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.40.2"},"gitHead":"6cac7405f6b69da691785a727b1702e1c74fafe7","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_id":"tempfile@4.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"39e1bbe02f2d5cc3588ffb07c50ecfbea6c7cc91","size":1706,"noattachment":false,"key":"/tempfile/-/tempfile-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tempfile_4.0.0_1623137565591_0.7988972765823228"},"_hasShrinkwrap":false,"publish_time":1623137565909,"_cnpm_publish_time":1623137565909},"3.0.0":{"name":"tempfile","version":"3.0.0","description":"Get a random temporary file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["temp","temporary","tempfile","file","path","random","uuid"],"dependencies":{"temp-dir":"^2.0.0","uuid":"^3.3.2"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"1884d5ef7f51342fbed8506ac75e7c0ab241d2f9","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_id":"tempfile@3.0.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5376a3492de7c54150d0cc0612c3f00e2cdaf76c","size":1767,"noattachment":false,"key":"/tempfile/-/tempfile-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tempfile_3.0.0_1556464419476_0.2934668968732854"},"_hasShrinkwrap":false,"publish_time":1556464419592,"_cnpm_publish_time":1556464419592},"2.0.0":{"name":"tempfile","version":"2.0.0","description":"Get a random temporary file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand","uuid"],"dependencies":{"temp-dir":"^1.0.0","uuid":"^3.0.1"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"fec4570a2dd5b0d5387968729615444d26b6f25f","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_id":"tempfile@2.0.0","_shasum":"6b0446856a9b1114d1856ffcbe509cccb0977265","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6b0446856a9b1114d1856ffcbe509cccb0977265","size":1698,"noattachment":false,"key":"/tempfile/-/tempfile-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tempfile-2.0.0.tgz_1490717520736_0.8753022798337042"},"directories":{},"publish_time":1490717521231,"_hasShrinkwrap":false,"_cnpm_publish_time":1490717521231},"1.1.1":{"name":"tempfile","version":"1.1.1","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tempfile.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"os-tmpdir":"^1.0.0","uuid":"^2.0.1"},"devDependencies":{"mocha":"*"},"gitHead":"8f245060155cb44945b8c636109f91c09d2af5e2","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile#readme","_id":"tempfile@1.1.1","_shasum":"5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2","_from":".","_npmVersion":"2.9.0","_nodeVersion":"0.12.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2","size":1575,"noattachment":false,"key":"/tempfile/-/tempfile-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-1.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1431027959388,"_cnpm_publish_time":1431027959388,"_hasShrinkwrap":false},"1.1.0":{"name":"tempfile","version":"1.1.0","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/tempfile"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"uuid":"^2.0.1"},"devDependencies":{"mocha":"*"},"gitHead":"a49b8e374480bdcd34ed4c031a1c1e6f845a7280","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile","_id":"tempfile@1.1.0","_shasum":"c78a6b110a2635a23a5450afdc47822940a817e3","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"c78a6b110a2635a23a5450afdc47822940a817e3","size":879,"noattachment":false,"key":"/tempfile/-/tempfile-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-1.1.0.tgz"},"directories":{},"publish_time":1412346431242,"_cnpm_publish_time":1412346431242,"_hasShrinkwrap":false},"1.0.0":{"name":"tempfile","version":"1.0.0","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/tempfile"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"uuid":"^1.4.0"},"devDependencies":{"mocha":"*"},"gitHead":"4e5b2ad4dfbdeb0d69f0edb1b3534a5b2bdc3e2b","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile","_id":"tempfile@1.0.0","_shasum":"ca8eac85a7c6017f70949de0a784ac776b621849","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"ca8eac85a7c6017f70949de0a784ac776b621849","size":872,"noattachment":false,"key":"/tempfile/-/tempfile-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-1.0.0.tgz"},"directories":{},"publish_time":1407947219131,"_cnpm_publish_time":1407947219131,"_hasShrinkwrap":false},"0.1.3":{"name":"tempfile","version":"0.1.3","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/tempfile"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"uuid":"~1.4.0"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile","_id":"tempfile@0.1.3","dist":{"shasum":"7d6b710047339d39f847327a056dadf183103010","size":902,"noattachment":false,"key":"/tempfile/-/tempfile-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-0.1.3.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1395868646561,"_cnpm_publish_time":1395868646561,"_hasShrinkwrap":false},"0.1.2":{"name":"tempfile","version":"0.1.2","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/tempfile"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"uuid":"~1.4.0"},"devDependencies":{"mocha":"*"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile","_id":"tempfile@0.1.2","dist":{"shasum":"81d4e51f35856592f3b51d568135791af3b038e0","size":892,"noattachment":false,"key":"/tempfile/-/tempfile-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1388536306210,"_cnpm_publish_time":1388536306210,"_hasShrinkwrap":false},"0.1.1":{"name":"tempfile","version":"0.1.1","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/tempfile"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"uuid":"~1.4.0"},"devDependencies":{"mocha":"*"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile","_id":"tempfile@0.1.1","dist":{"shasum":"d0b3f931aa921f9086b185b70c32d7eb98e258f3","size":800,"noattachment":false,"key":"/tempfile/-/tempfile-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1388531922792,"_cnpm_publish_time":1388531922792,"_hasShrinkwrap":false},"0.1.0":{"name":"tempfile","version":"0.1.0","description":"Get a random temp file path","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/tempfile"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["tmp","temp","temporary","tempfile","file","path","random","rand"],"dependencies":{"uuid":"~1.4.0"},"devDependencies":{"mocha":"*"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"homepage":"https://github.com/sindresorhus/tempfile","_id":"tempfile@0.1.0","dist":{"shasum":"d85d509c57cf8f3c1591bbbd90a27d03d24af842","size":810,"noattachment":false,"key":"/tempfile/-/tempfile-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tempfile/download/tempfile-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1388531238013,"_cnpm_publish_time":1388531238013,"_hasShrinkwrap":false}},"readme":"# tempfile\n\n> Get a random temporary file path\n\n**Checkout out [`tempy`](https://github.com/sindresorhus/tempy) which is a better take on this module.**\n\n## Install\n\n```sh\nnpm install tempfile\n```\n\n## Usage\n\n```js\nimport tempfile from 'tempfile';\n\ntempfile();\n//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/6271e235-13b9-4138-8b9b-ee2f26c09ce3'\n```\n\n## API\n\n### tempfile(options?)\n\n#### options\n\nType: `object`\n\n##### extension\n\nType: `string`\n\nA file extension to append to the path.\n\n```js\nimport tempfile from 'tempfile';\n\ntempfile();\n//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/6271e235-13b9-4138-8b9b-ee2f26c09ce3'\n\ntempfile({extension: 'png'});\n//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png'\n```\n\n## Related\n\n- [tempy](https://github.com/sindresorhus/tempy) - Get a random temporary file or directory path\n- [temp-write](https://github.com/sindresorhus/temp-write) - Write string/buffer/stream to a random temp file\n","_attachments":{},"homepage":"https://github.com/sindresorhus/tempfile#readme","bugs":{"url":"https://github.com/sindresorhus/tempfile/issues"},"license":"MIT"}