{"name":"isexe","version":"3.1.2","author":{"url":"http://blog.izs.me/","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"BlueOak-1.0.0","_id":"isexe@3.1.2","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/isaacs/isexe#readme","bugs":{"url":"https://github.com/isaacs/isexe/issues"},"dist":{"shasum":"08e5349db03ff0654f3b3efe798f94aa4bda4f8f","tarball":"http://registry-npm.ywwl.com/isexe/download/isexe-3.1.2.tgz","fileCount":37,"integrity":"sha512-mIcis6w+JiQf3P7t7mg/35GKB4T1FQsBOtMIvuKw4YErj5RjtbhcTd5/I30fmkmGMwvI0WlzSNN+27K0QCMkAw==","signatures":[{"sig":"MEUCIQCjh6vo9JIKXTW7093+yCOFb45h/cuWgvk9Eip8A1CYbwIgCSAqPlrdRPDj21F14HvLXcf5QVePYgke6PKUKy69sC0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43353,"size":7537,"noattachment":false,"key":"/isexe/-/isexe-3.1.2.tgz"},"main":"./dist/commonjs/index.js","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"},"selfLink":false},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=20"},"exports":{".":{"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":"2f27c504fec2c29980b7e0dfe8ce96d4cb01540d","scripts":{"snap":"tap","test":"tap","format":"prettier --write .","prepare":"tshy","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.0","tshy":"^3.1.0","typedoc":"^0.28.16","prettier":"^3.8.1","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/isexe_3.1.2_1770322100065_0.42305215935164586","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":1770322100221,"_cnpm_publish_time":1770322100221,"dist-tags":{"latest":"4.0.0"}}