Socket
Socket
Sign inDemoInstall

parents

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

7

index.js

@@ -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;
}

2

package.json
{
"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();
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc