https://github.com/martinheidegger/tmpdir-polyfill
Node.js os.tmpdir polyfill for older versions of node.js.
https://github.com/martinheidegger/tmpdir-polyfill
legacy nodejs polyfill tmpdir
Last synced: 4 months ago
JSON representation
Node.js os.tmpdir polyfill for older versions of node.js.
- Host: GitHub
- URL: https://github.com/martinheidegger/tmpdir-polyfill
- Owner: martinheidegger
- License: mit
- Created: 2019-02-20T17:25:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T17:28:35.000Z (almost 7 years ago)
- Last Synced: 2025-10-09T13:32:43.954Z (4 months ago)
- Topics: legacy, nodejs, polyfill, tmpdir
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# tmpdir-polyfill [](https://www.npmjs.com/package/tmpdir-polyfill) [](https://npmjs.org/package/tmpdir-polyfill) [](https://travis-ci.org/martinheidegger/tmpdir-polyfill)
> Node.js os.tmpdir polyfill for older versions of node.js.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save tmpdir-polyfill
```
## Usage
```js
var homedir = require('tmpdir-polyfill');
console.log(tmpdir());
//=> /var/folders/g2/bqbqq47d4pg7v4rqx90612m00000gn/T
```
## Reasoning
This library is a polyfill for the [node.js os.tmpdir](https://nodejs.org/api/os.html#os_os_tmpdir) to work consistently in older nodejs versions.
In versions of node.js newer or equal 4, [os.tmpdir](https://nodejs.org/api/os.html#os_os_tmpdir) is used.
## About
### Related projects
[homedir-polyfill](https://www.npmjs.com/package/homedir-polyfill):
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new) & be kind.
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Martin Heidegger**
* [github/martinheidegger](https://github.com/martinheidegger)
* [twitter/leichtgewicht](http://twitter.com/leichtgewicht)
### License
Copyright © 2019, [Martin Heidegger](https://github.com/martinheidegger).
Released under the [MIT license](LICENSE).