os-tmpdir
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,3 +5,3 @@ 'use strict'; | ||
// https://github.com/nodejs/io.js/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 | ||
// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 | ||
module.exports = function () { | ||
@@ -8,0 +8,0 @@ var path; |
{ | ||
"name": "os-tmpdir", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Node.js os.tmpdir() ponyfill", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "xo && ava" | ||
}, | ||
@@ -39,4 +39,5 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
"ava": "*", | ||
"xo": "^0.16.0" | ||
} | ||
} |
# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) | ||
> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) ponyfill | ||
> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com) | ||
> Ponyfill: A polyfill that doesn't overwrite the native method | ||
Use this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8). | ||
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 | ||
@@ -22,6 +18,6 @@ | ||
```js | ||
var osTmpdir = require('os-tmpdir'); | ||
const osTmpdir = require('os-tmpdir'); | ||
osTmpdir(); | ||
//=> /var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T | ||
//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T' | ||
``` | ||
@@ -37,2 +33,2 @@ | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
3056
2
33