You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

os-tmpdir

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

os-tmpdir

Node.js os.tmpdir() ponyfill


Version published
Maintainers
1
Created

Package description

What is os-tmpdir?

The os-tmpdir npm package is a simple utility module that provides a cross-platform way of getting the operating system's default directory for temporary files. As of Node.js v4.0.0, this functionality is built into the core os module, making os-tmpdir mostly obsolete. However, it can still be used for compatibility with older versions of Node.js.

What are os-tmpdir's main functionalities?

Get the OS temporary directory

This feature allows you to retrieve the path to the system's temporary directory, which is useful for creating temporary files or directories during the execution of a program.

const osTmpdir = require('os-tmpdir');
console.log(osTmpdir());

Other packages similar to os-tmpdir

Readme

Source

Deprecated: This is not needed anymore. require('os').tmpdir() in Node.js 4 and up is good.


os-tmpdir Build Status

Node.js os.tmpdir() ponyfill

Use this instead of require('os').tmpdir() to get a consistent behavior on different Node.js versions (even 0.8).

Install

$ npm install --save os-tmpdir

Usage

const osTmpdir = require('os-tmpdir');

osTmpdir();
//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T'

API

See the os.tmpdir() docs.

License

MIT © Sindre Sorhus

Keywords

FAQs

Package last updated on 08 Nov 2018

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc