Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

temporary

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temporary - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

5

History.md
0.0.8 / 2014-01-05
==================
* Fix Node 0.11 error when path is frozen.
0.0.7 / 2013-09-25

@@ -3,0 +8,0 @@ ==================

15

lib/detector.js

@@ -23,5 +23,5 @@ /**

var normalize = function(path) {
var last = Array.prototype.pop.apply(path);
var last = path[path.length - 1];
if (process.platform !== "win32") {
if (detector.platform() !== "win32") {
if (last !== '/') {

@@ -53,3 +53,3 @@ path += '/';

|| process.env.TEMP
|| (process.platform === "win32" ? "c:\\windows\\temp\\" : "/tmp/")
|| (detector.platform() === "win32" ? "c:\\windows\\temp\\" : "/tmp/")

@@ -59,2 +59,11 @@ return normalize(temp);

/**
* Returns the platform. Allows Tests to verify all behaviors.
*
* @returns {String} platform.
*/
detector.platform = function() {
return process.platform;
};
detector._normalize = normalize;

2

package.json
{
"name": "temporary"
, "version": "0.0.7"
, "version": "0.0.8"
, "description": "The lord of tmp."

@@ -5,0 +5,0 @@ , "keywords": ["tmp", "temp", "tempfile", "tempdirectory"]

@@ -24,5 +24,7 @@ /**

it('should normalize windows paths correctly', function () {
var platform_noConflict = process.platform;
var platform_noConflict = detector.platform;
process.platform = 'win32';
detector.platform = function() {
return 'win32';
};
detector._normalize('c:\\windows\\foo\\bar\\')

@@ -36,3 +38,3 @@ .should.eql('c:\\windows\\foo\\bar\\/');

.should.eql('c:\\windows\\foo\\bar/');
process.platform = platform_noConflict;
detector.platform = platform_noConflict;
});

@@ -39,0 +41,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc