parents
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -13,3 +13,3 @@ var path = require('path'); | ||
var join = function (x, y) { | ||
var ps = [].slice.call(arguments).filter(function (p) { | ||
var ps = [ x, y ].filter(function (p) { | ||
return p && typeof p === 'string' | ||
@@ -29,3 +29,8 @@ }); | ||
if (res[0] === res[1]) return [ res[0] ]; | ||
if (isWindows && /^\\/.test(cwd)) { | ||
return res.slice(0,-1).map(function (d) { | ||
return d.replace(/^\./, ''); | ||
}); | ||
} | ||
return res; | ||
} |
{ | ||
"name" : "parents", | ||
"version" : "0.0.1", | ||
"version" : "0.0.2", | ||
"description" : "return all the parent directories for a directory", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
@@ -22,1 +22,14 @@ var test = require('tap').test; | ||
}); | ||
test('win32 network drive', function (t) { | ||
var dirs = parents( | ||
'\\storageserver01\\Active Projects\\ProjectA', | ||
{ platform : 'win32' } | ||
); | ||
t.same(dirs, [ | ||
'\\storageserver01\\Active Projects\\ProjectA', | ||
'\\storageserver01\\Active Projects', | ||
'\\storageserver01' | ||
]); | ||
t.end(); | ||
}); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
6049
86
0
1