tempfile
Get a random temporary file path
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tempfile 
SYNC missed versions from official npm registry.

tempfile Build Status

Get a random temporary file path

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

Install

$ npm install tempfile

Usage

const tempfile = require('tempfile');

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

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

API

tempfile([extension])

extension

Type: string

Extension to append to the path.

Related

  • tempy - Get a random temporary file or directory path
  • temp-write - Write string/buffer/stream to a random temp file

License

MIT © Sindre Sorhus

Current Tags

  • 3.0.0                                ...           latest (a year ago)

9 Versions

  • 3.0.0                                ...           a year ago
  • 2.0.0                                ...           3 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 2,109
This Week 12,236
This Month 7,203
Last Day 2,519
Last Week 10,949
Last Month 56,632
Dependencies (2)
Dev Dependencies (3)
Dependents (248)

Copyright 2014 - 2017 © taobao.org |