{"_id":"path-type","_rev":"3711692","name":"path-type","description":"Check if a path is a file, directory, or symlink","dist-tags":{"latest":"6.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2025-02-13T05:57:45.000Z","created":"2015-09-04T08:35:55.517Z","6.0.0":"2024-07-26T10:54:40.007Z","5.0.0":"2021-01-27T12:52:38.113Z","4.0.0":"2019-03-12T09:25:18.333Z","3.0.0":"2017-07-08T23:00:58.771Z","2.0.0":"2016-09-28T08:28:37.085Z","1.1.0":"2015-11-14T19:39:01.645Z","1.0.0":"2015-09-04T08:35:55.517Z"},"users":{"huhgawz":true,"rocket0191":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-type.git"},"versions":{"6.0.0":{"name":"path-type","version":"6.0.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-type.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["path","fs","type","is","check","directory","file","filepath","symlink","symbolic","link","stat","stats","filesystem"],"devDependencies":{"ava":"^6.1.3","nyc":"^17.0.0","tsd":"^0.31.1","xo":"^0.59.2"},"_id":"path-type@6.0.0","gitHead":"e772400aa20cc9371fd70943e731a36b30cf8950","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type#readme","_nodeVersion":"18.20.2","_npmVersion":"10.6.0","dist":{"shasum":"2f1bb6791a91ce99194caede5d6c5920ed81eb51","size":1987,"noattachment":false,"key":"/path-type/-/path-type-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-type_6.0.0_1721991279862_0.010225212537439576"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-26T10:54:40.007Z","publish_time":1721991280007,"_source_registry_name":"default","_cnpm_publish_time":1721991280007},"5.0.0":{"name":"path-type","version":"5.0.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-type.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && nyc ava && tsd"},"keywords":["path","fs","type","is","check","directory","file","filepath","symlink","symbolic","link","stat","stats","filesystem"],"devDependencies":{"ava":"^3.15.0","nyc":"^15.1.0","tsd":"^0.14.0","xo":"^0.37.1"},"gitHead":"80853698ad527c10fc692e71981345762e22f69b","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type#readme","_id":"path-type@5.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8","size":2190,"noattachment":false,"key":"/path-type/-/path-type-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-type_5.0.0_1611751958019_0.16773508773368095"},"_hasShrinkwrap":false,"publish_time":1611751958113,"_cnpm_publish_time":1611751958113},"4.0.0":{"name":"path-type","version":"4.0.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-type.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && nyc ava && tsd-check"},"keywords":["path","fs","type","is","check","directory","dir","file","filepath","symlink","symbolic","link","stat","stats","filesystem"],"devDependencies":{"ava":"^1.3.1","nyc":"^13.3.0","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"b60678846423629b1293955d88a41f7e1d87c338","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type#readme","_id":"path-type@4.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"84ed01c0a7ba380afe09d90a8c180dcd9d03043b","size":2018,"noattachment":false,"key":"/path-type/-/path-type-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-type_4.0.0_1552382718141_0.897837094933279"},"_hasShrinkwrap":false,"publish_time":1552382718333,"_cnpm_publish_time":1552382718333},"3.0.0":{"name":"path-type","version":"3.0.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-type.git"},"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":"*"},"gitHead":"a83cd9d8ad6560dadaa85ae3e677e5a3b58e3ee4","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type#readme","_id":"path-type@3.0.0","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f","size":1762,"noattachment":false,"key":"/path-type/-/path-type-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-type-3.0.0.tgz_1499554857781_0.09718758845701814"},"directories":{},"publish_time":1499554858771,"_hasShrinkwrap":false,"_cnpm_publish_time":1499554858771},"2.0.0":{"name":"path-type","version":"2.0.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-type.git"},"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},"gitHead":"ef08bdbd35fa01342ef6d80f2e8eb8b9c2cccc30","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type#readme","_id":"path-type@2.0.0","_shasum":"f012ccb8415b7096fc2daa1054c3d72389594c73","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f012ccb8415b7096fc2daa1054c3d72389594c73","size":1742,"noattachment":false,"key":"/path-type/-/path-type-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/path-type-2.0.0.tgz_1475051315257_0.8221027220133692"},"directories":{},"publish_time":1475051317085,"_cnpm_publish_time":1475051317085,"_hasShrinkwrap":false},"1.1.0":{"name":"path-type","version":"1.1.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/path-type"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","fs","type","is","check","directory","dir","file","filepath","symlink","symbolic","link","stat","stats","filesystem"],"dependencies":{"graceful-fs":"^4.1.2","pify":"^2.0.0","pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"ignores":["test.js"]},"gitHead":"dff5c2a62f89efe7e0cce600bf38e76196d8b4b2","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type","_id":"path-type@1.1.0","_shasum":"59c44f7ee491da704da415da5a4070ba4f8fe441","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"59c44f7ee491da704da415da5a4070ba4f8fe441","size":1798,"noattachment":false,"key":"/path-type/-/path-type-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1447529941645,"_cnpm_publish_time":1447529941645,"_hasShrinkwrap":false},"1.0.0":{"name":"path-type","version":"1.0.0","description":"Check if a path is a file, directory, or symlink","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/path-type"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","fs","type","is","check","directory","dir","file","filepath","symlink","symbolic","link","stat","stats","filesystem"],"dependencies":{"graceful-fs":"^4.1.2","pify":"^2.0.0","pinkie-promise":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"b29ddf1e71fe346a1034e3914efb70287e2ddf64","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"homepage":"https://github.com/sindresorhus/path-type","_id":"path-type@1.0.0","_shasum":"51b127d4884100f5808256e45d471716ba16f62d","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"51b127d4884100f5808256e45d471716ba16f62d","size":1776,"noattachment":false,"key":"/path-type/-/path-type-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-type/download/path-type-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1441355755517,"_cnpm_publish_time":1441355755517,"_hasShrinkwrap":false}},"readme":"# path-type\n\n> Check if a path is a file, directory, or symlink\n\n## Install\n\n```sh\nnpm install path-type\n```\n\n## Usage\n\n```js\nimport {isFile} from 'path-type';\n\nconsole.log(await isFile('package.json'));\n//=> true\n```\n\n## API\n\n### isFile(path)\n\nCheck whether the passed `path` is a file.\n\nReturns a `Promise<boolean>`.\n\n#### path\n\nType: `string`\n\nThe path to check.\n\n### isDirectory(path)\n\nCheck whether the passed `path` is a directory.\n\nReturns a `Promise<boolean>`.\n\n### isSymlink(path)\n\nCheck whether the passed `path` is a symlink.\n\nReturns a `Promise<boolean>`.\n\n### isFileSync(path)\n\nSynchronously check whether the passed `path` is a file.\n\nReturns a `boolean`.\n\n### isDirectorySync(path)\n\nSynchronously check whether the passed `path` is a directory.\n\nReturns a `boolean`.\n\n### isSymlinkSync(path)\n\nSynchronously check whether the passed `path` is a symlink.\n\nReturns a `boolean`.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/path-type#readme","bugs":{"url":"https://github.com/sindresorhus/path-type/issues"},"license":"MIT"}