Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 15, 2024 via pnpm

path-type 4.0.0

Check if a path is a file, directory, or symlink
Package summary
Share
0
issues
1
license
1
MIT
Package created
4 Sep 2015
Version published
12 Mar 2019
Maintainers
1
Total deps
1
Direct deps
0
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
1 Packages, Including:
path-type@4.0.0
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

0
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

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.