Socket
Socket
Sign inDemoInstall

os-tmpdir

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    os-tmpdir

Node.js os.tmpdir() ponyfill


Version published
Weekly downloads
22M
decreased by-1.26%
Maintainers
1
Install size
4.00 kB
Created
Weekly downloads
 

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

os-tmpdir Build Status

Node.js os.tmpdir() ponyfill

Ponyfill: A polyfill that doesn't overwrite the native method

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

This is actually taken from io.js 2.0.2 as it contains some fixes that haven't bubbled up to Node.js yet.

Install

$ npm install --save os-tmpdir

Usage

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

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

API

See the os.tmpdir() docs.

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 16 May 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc