{"name":"isexe","version":"3.1.4","author":{"url":"http://blog.izs.me/","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"BlueOak-1.0.0","_id":"isexe@3.1.4","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/isaacs/isexe#readme","bugs":{"url":"https://github.com/isaacs/isexe/issues"},"dist":{"shasum":"75ba4af061c058f633bde8cd5df903f1cdbbe751","tarball":"http://registry-npm.ywwl.com/isexe/download/isexe-3.1.4.tgz","fileCount":41,"integrity":"sha512-jCErc4h4RnTPjFq53G4whhjAMbUAqinGrCrTT4dmMNyi4zTthK+wphqbRLJtL4BN/Mq7Zzltr0m/b1X0m7PGFQ==","signatures":[{"sig":"MEQCIE5ZyUNNxUsYPQqZTi/6Rb0kX0oHolp+aqsRiqel2GjnAiB7CMz/bd/VFyxMEPHPf3G1udi0EKIn0TDUZRO1OH4XHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64013,"size":10593,"noattachment":false,"key":"/isexe/-/isexe-3.1.4.tgz"},"main":"./dist/commonjs/index.min.js","tshy":{"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}},"./raw":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.min.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}},"./raw":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"94312d3e9514f897d8c1f33179269721de0b699a","scripts":{"snap":"tap","test":"tap","format":"prettier --write .","prepare":"tshy && bash build.sh","presnap":"npm run prepare","pretest":"npm run prepare","typedoc":"typedoc","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git+https://github.com/isaacs/isexe.git","type":"git"},"_npmVersion":"11.9.0","description":"Minimal module to check if a file is executable.","directories":{},"_nodeVersion":"24.4.1","_hasShrinkwrap":false,"devDependencies":{"tap":"^21.5.1","tshy":"^3.1.3","esbuild":"^0.27.3","typedoc":"^0.28.16","prettier":"^3.8.1","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/isexe_3.1.4_1770524611961_0.0822799883179468","host":"s3://npm-registry-packages-npm-production"},"readme":"# isexe\n\nMinimal module to check if a file is executable, and a normal file.\n\nUses `fs.stat` and tests against the `PATHEXT` environment variable on\nWindows.\n\n## USAGE\n\n```js\n// default export is a minified version that doesn't need to\n// load more than one file. Load the 'isexe/raw' export if\n// you want the non-minified version for some reason.\nimport { isexe, sync } from 'isexe'\n// or require() works too\n// const { isexe } = require('isexe')\nisexe('some-file-name').then(\n  isExe => {\n    if (isExe) {\n      console.error('this thing can be run')\n    } else {\n      console.error('cannot be run')\n    }\n  },\n  err => {\n    console.error('probably file doesnt exist or something')\n  },\n)\n\n// same thing but synchronous, throws errors\nisExe = sync('some-file-name')\n\n// treat errors as just \"not executable\"\nconst isExe = await isexe('maybe-missing-file', { ignoreErrors: true })\nconst isExe = sync('maybe-missing-file', { ignoreErrors: true })\n```\n\n## API\n\n### `isexe(path, [options]) => Promise<boolean>`\n\nCheck if the path is executable.\n\nWill raise whatever errors may be raised by `fs.stat`, unless\n`options.ignoreErrors` is set to true.\n\n### `sync(path, [options]) => boolean`\n\nSame as `isexe` but returns the value and throws any errors raised.\n\n## Platform Specific Implementations\n\nIf for some reason you want to use the implementation for a\nspecific platform, you can do that.\n\n```js\nimport { win32, posix } from 'isexe'\nwin32.isexe(...)\nwin32.sync(...)\n// etc\n\n// or:\nimport { isexe, sync } from 'isexe/posix'\n```\n\nThe default exported implementation will be chosen based on\n`process.platform`.\n\n### Options\n\n```ts\nimport type IsexeOptions from 'isexe'\n```\n\n- `ignoreErrors` Treat all errors as \"no, this is not\n  executable\", but don't raise them.\n- `uid` Number to use as the user id on posix\n- `gid` Number to use as the group id on posix\n- `pathExt` List of path extensions to use instead of `PATHEXT`\n  environment variable on Windows.\n","publish_time":1770524612097,"_cnpm_publish_time":1770524612097,"dist-tags":{"latest":"4.0.0"}}