Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tmp-sync

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmp-sync

The sync version of tmp just for test cases, making it much easier.

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.1K
decreased by-39.72%
Maintainers
1
Weekly downloads
 
Created
Source

tmp-sync NPM version Build Status Dependency Status

The sync version of tmp just for test cases, making our life it much easier.

Why?

I got tired of write asynchronous codes of tmp even just in test cases.

Only use this package in your test cases, not in production environment for you should always using asynchronous fs.

Usage

var tmp = require('tmp-sync');

tmp.in([root])

  • root path= the root path for the temp directory (optional, default to OS tmp directory)

Makes a temp dir inside root and returns the newly created dir. The dir will be automatically tmp.mark()ed.

tmp.mark(dir)

  • dir path the path of a directory

Marks a dir, and the dir will be removed when the current process exits.

tmp.clean()

Cleans all marked tmp dirs. Most usually you need not to call this method manually.

Keywords

FAQs

Package last updated on 27 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc