New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parents

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parents - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

4

index.js

@@ -19,3 +19,3 @@ var path = require('path');

return path.normalize(cwd)
var res = path.normalize(cwd)
.split(sep)

@@ -28,2 +28,4 @@ .reduce(function (acc,dir,ix) {

;
if (res[0] === res[1]) return [ res[0] ];
return res;
}
{
"name" : "parents",
"version" : "0.0.0",
"version" : "0.0.1",
"description" : "return all the parent directories for a directory",

@@ -5,0 +5,0 @@ "main" : "index.js",

@@ -15,1 +15,7 @@ var test = require('tap').test;

});
test('root', function (t) {
var dirs = parents('/');
t.same(dirs, [ '/' ]);
t.end();
});

@@ -16,1 +16,7 @@ var test = require('tap').test;

});
test('win32 c:', function (t) {
var dirs = parents('C:\\', { platform : 'win32' });
t.same(dirs, [ 'C:' ]);
t.end();
});
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