New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tmpz

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmpz

Copy a file or directory to OS temporary directory with a random name. Also you can remove it later.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

Tmpz Build Status Coverage Status Standard - JavaScript Style Guide Greenkeeper badge

Copy a file or directory to OS temporary directory with a random name. Also you can remove it later.

Prerequisites

NodeJS v4.0 or greater.

Install

npm install tmpz --save-dev

Usage

const tmpz = require('tmpz')

try {
  const dest = tmpz.copy('./my_directory')
  console.log(dest)
  // > /tmp/393a6d0851bb6c10214f92bbaa9c833d

  // Removing the temp dir in 7 seconds
  setTimeout(() => tmpz.remove(dest), 7000)
} catch (err) {
  console.error(err)
}

License

MIT license

© 2017 José Luis Quintana

Keywords

copy

FAQs

Package last updated on 06 Apr 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