Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 6, 2024 via pnpm

path-type 1.1.0

Check if a path is a file, directory, or symlink
Package summary
Share
0
issues
2
licenses
4
MIT
1
ISC
Package created
4 Sep 2015
Version published
14 Nov 2015
Maintainers
1
Total deps
5
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
path-type@1.1.0
pify@2.3.0
pinkie-promise@2.0.1
pinkie@2.0.4

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
graceful-fs@4.2.11
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of path-type 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
graceful-fs4.2.119.57 kBISC
prod
pify2.3.02.73 kBMIT
prod
pinkie-promise2.0.11.5 kBMIT
prod

Visualizations

Frequently Asked Questions

What does path-type do?

The npm package "path-type" serves the purpose of checking if a specified path is a file, directory, or symbolic link. This utility tool can be beneficial for JavaScript developers in implementing logical conditions based on the type of the path in their software.

How do you use path-type?

Using the "path-type" package is simple and straightforward. Start by installing the package through your npm installation using the command "$ npm install path-type". After installation, it can be imported to your Node.js project and used to check the type of a certain path. Here is an example on how to check if a path points to a file:

import {isFile} from 'path-type';

(async () => {
  const result = await isFile('package.json');  // Insert your path as argument
  console.log(result);  // logs "true" if the path points to a file, "false" otherwise
})();

Synchronous versions of the check methods are also available. Just suffix "Sync" to the method name, like this:

import {isFileSync} from 'path-type';

let result = isFileSync('package.json');  // Insert your path as argument
console.log(result);  // logs "true" if the path points to a file, "false" otherwise

Please replace 'package.json' with the path you want to check.

Where are the path-type docs?

The detailed documentation for the "path-type" package is present on its GitHub repository page at https://github.com/sindresorhus/path-type.git. The README file on the repository page elaborates on the installation process, usage, and provides the whole API reference.