os-tmpdir
Advanced tools
Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
var isWindows = process.platform === 'win32'; | ||
var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; | ||
// https://github.com/iojs/io.js/blob/b97b96d05a05429f5eccf1588f183a925fbececa/lib/os.js#L25-L40 | ||
// https://github.com/nodejs/io.js/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 | ||
module.exports = function () { | ||
@@ -19,3 +20,3 @@ var path; | ||
if (/[\\\/]$/.test(path)) { | ||
if (trailingSlashRe.test(path)) { | ||
path = path.slice(0, -1); | ||
@@ -22,0 +23,0 @@ } |
{ | ||
"name": "os-tmpdir", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Node.js os.tmpdir() ponyfill", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -9,3 +9,3 @@ # os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) | ||
*This is actually taken from io.js as it contains a [fix](https://github.com/iojs/io.js/commit/b57cc51d8d3f4ad279591ae8fa6584ee22773b97) that haven't bubbled up to Node.js yet.* | ||
*This is actually taken from io.js 2.0.2 as it contains some fixes that haven't bubbled up to Node.js yet.* | ||
@@ -12,0 +12,0 @@ |
21
3189