5.0.0 • Published 2 years ago

tempfile v5.0.0

Weekly downloads
1,852,196
License
MIT
Repository
github
Last release
2 years ago

tempfile

Get a random temporary file path

Checkout out tempy which is a better take on this module.

Install

npm install tempfile

Usage

import tempfile from 'tempfile';

tempfile();
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/6271e235-13b9-4138-8b9b-ee2f26c09ce3'

API

tempfile(options?)

options

Type: object

extension

Type: string

A file extension to append to the path.

import tempfile from 'tempfile';

tempfile();
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/6271e235-13b9-4138-8b9b-ee2f26c09ce3'

tempfile({extension: 'png'});
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png'

Related

  • tempy - Get a random temporary file or directory path
  • temp-write - Write string/buffer/stream to a random temp file
bin-buildkilli8n-react-native-fast-imageedgeroutine-clifeebas-libgql-bin@snyk/snyk-devmd-reader@jttechnic/interpreterunblock-block-save-variables@everything-registry/sub-chunk-2888taskwiz-json-adapterweighwallpaper-everydaywallpaper-prankwallpaper-clixmmssg_designertelegram-bot-clienttempdirsplunk-emittestrontestbot-agsvg-term-clithebook-pdfyvideo-testdata-loader@coveo/semantic-monorepo-tools@rawqing/mdetoxjeuxuikanahei-wallpapersjm-deployjora-clijrjtcsmcccknitr-jslazy-bee-uisimply-color-extractionstylelint-onlysphere-product-type-exportstreamjqstreattts-clitypeorm-migrate-to-sqltinyjs-resource-loadertinylistenertrs-commitizentweeter-server@amiruldev/wajs@apica-io/url-xi@amory/image-create@avinashbharti97/detox@alicloud/edgeroutine-cli@balena/testbot@bgpworks/goglobal-generator@buggyorg/component-library@buggyorg/graphify@buggyorg/library-fileserver@buggyorg/lisgy@burnerwah/ffmpeg-optimizer@achingbrain/gulp-webpack-sourcemaps@acst11/testbot@code-dependency/cli@boundless-inc/mobiledoc-dom-rendererwatcher-sudounitxuseableverrazzanourl-to-epubziu@ferocia-oss/osnap@dstil/git-persistence@hackinggate/detox@hkube/hkube@geekykaran/detox@geut/chan@infinitebrahmanuniverse/nolb-tempf@liyj1983/sharklet-cli@localnerve/bin-build@lordbeanbag/vite-plugin-svg-icons-monorepo@mtntop/utils@marionebl/conventional-changelog-cli@nader3456/zigbee2mqtt-frontend@nocodesites/builder@nocodesites/gdrive-loader@fa7ad/wallpaper-cli@melody-core/historian@mittwald/cli@interslavic/database-engine-fs@j-ho/image-colors@kabegami-new-page/kanahei.js@skyscanner/detox@spinajs/templates@spinajs/templates-handlebars@spinajs/jobs-stomp-transport@spinajs/jobs@spinajs/jobs-amqp-transport@spinajs/templates-mjml@spinajs/templates-pug@spinajs/templates-xlsx@remy/node-jq@sealcode/tempseal-components@rochars/rollup-plugin-closure-compiler@stacio/detox
5.0.0

2 years ago

4.0.0

4 years ago

3.0.0

6 years ago

2.0.0

8 years ago

1.1.1

10 years ago

1.1.0

11 years ago

1.0.0

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago