sindresorhus

path-type

Check if a path is a file, directory, or symlink

by sindresorhus

JavaScript

JavaScript87.1%
TypeScript12.9%

Commit activity

Last 12 weeks · 1 commit

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
outslept

The package currently provides methods to check path types: / / / Node.js has had these capabilities natively since a really long time through the and modules, and they've been stable for a while. Given that all Node.js versions before 16.x are now EOL (End-of-Life), developers can safely use these native methods. Native implementation provides the same functionality and more: Given these facts, perhaps, adding some type of notice, suggesting users migrate to native Node.js methods for modern projects would be benefitial?

outslept · 8mo ago
OmgImAlexis

I'm hitting a similar issue to https://github.com/TypeStrong/ts-node/issues/155#issuecomment-570120923 with and while importing this in one of the functions I'm testing. If there's no fix feel free to close this. I figured I couldn't hurt to open and at least others will now be able to find this.

OmgImAlexis · 4y ago
AlexMeah

This adds graceful handling of invalid paths. I think is the correct response rather than throwing as the file is not of that type if it cannot be read. Context: This is affecting Vite due to their use of virtual modules, which they signify by using in the path.

AlexMeah · 4y ago
Structured data for AI agents

Repository: sindresorhus/path-type. Description: Check if a path is a file, directory, or symlink Stars: 81, Forks: 15. Primary language: JavaScript. Languages: JavaScript (87.1%), TypeScript (12.9%). License: MIT. Latest release: v6.0.0 (2y ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, coreyfarrell, arthurvr, BendingBender, kevva, lgrammel, Richienb.