tmpdir-polyfill
v1.0.0
Published
Node.js os.tmpdir polyfill for older versions of node.js.
Downloads
6
Maintainers
Readme
tmpdir-polyfill
Node.js os.tmpdir polyfill for older versions of node.js.
Install
Install with npm:
$ npm install --save tmpdir-polyfill
Usage
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 to work consistently in older nodejs versions.
In versions of node.js newer or equal 4, os.tmpdir is used.
About
Related projects
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue & be kind.
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Martin Heidegger
License
Copyright © 2019, Martin Heidegger. Released under the MIT license.