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

path-type

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-type - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

20

index.js

@@ -10,3 +10,11 @@ 'use strict';

return pify(fs[fn])(fp).then(stats => stats[fn2]());
return pify(fs[fn])(fp)
.then(stats => stats[fn2]())
.catch(err => {
if (err.code === 'ENOENT') {
return false;
}
throw err;
});
}

@@ -19,3 +27,11 @@

return fs[fn](fp)[fn2]();
try {
return fs[fn](fp)[fn2]();
} catch (err) {
if (err.code === 'ENOENT') {
return false;
}
throw err;
}
}

@@ -22,0 +38,0 @@

89

package.json
{
"name": "path-type",
"version": "2.0.0",
"description": "Check if a path is a file, directory, or symlink",
"license": "MIT",
"repository": "sindresorhus/path-type",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"path",
"fs",
"type",
"is",
"check",
"directory",
"dir",
"file",
"filepath",
"symlink",
"symbolic",
"link",
"stat",
"stats",
"filesystem"
],
"dependencies": {
"pify": "^2.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "path-type",
"version": "3.0.0",
"description": "Check if a path is a file, directory, or symlink",
"license": "MIT",
"repository": "sindresorhus/path-type",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"path",
"fs",
"type",
"is",
"check",
"directory",
"dir",
"file",
"filepath",
"symlink",
"symbolic",
"link",
"stat",
"stats",
"filesystem"
],
"dependencies": {
"pify": "^3.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
}

@@ -9,3 +9,3 @@ # path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type)

```
$ npm install --save path-type
$ npm install path-type
```

@@ -12,0 +12,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