function tmpdir() {
	var tmp;
	if ( IS_WINDOWS ) {
		tmp = ENV.TEMP ||
			ENV.TMP ||
			(ENV.SystemRoot || ENV.windir || '') + '\\temp';
	} else {
		tmp = ENV.TMPDIR ||
			ENV.TMP ||
			ENV.TEMP ||
			'/tmp';
	}
	if ( RE.test( tmp ) ) {
		tmp = tmp.slice( 0, -1 );
	}
	return tmp;
}
Returns the directory for storing temporary files.

## Notes

-   Introduced in io.js and Node v4. See the [ES5][1] and [ES6][2].

[1]: https://github.com/nodejs/node/blob/9cd44bb2b683446531306bbcff8739fc3526d02c/lib/os.js#L31
[2]: https://github.com/nodejs/node/blob/5e5ec2cd1ee875ec5c837b5e0721d73628f12053/lib/os.js#L40

@returns {string} directory for temporary files

@example
var dir = tmpdir();
// e.g., returns '/path/to/temporary/files/directory'