{"name":"isexe","version":"4.0.0","description":"Minimal module to check if a file is executable.","main":"./dist/commonjs/index.min.js","module":"./dist/esm/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"selfLink":false,"exports":{"./raw":"./src/index.ts","./package.json":"./package.json",".":{"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"}}}},"exports":{"./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",".":{"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"}}},"devDependencies":{"@types/node":"^25.2.1","esbuild":"^0.27.3","prettier":"^3.8.1","tap":"^21.5.1","tshy":"^3.1.3","typedoc":"^0.28.16"},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tshy && bash build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","format":"prettier --write .","typedoc":"typedoc"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"BlueOak-1.0.0","repository":{"type":"git","url":"git+https://github.com/isaacs/isexe.git"},"engines":{"node":">=20"},"type":"module","gitHead":"2e7df7dabc4f68e88cf6b32b9029225ba52c6b0c","_id":"isexe@4.0.0","bugs":{"url":"https://github.com/isaacs/isexe/issues"},"homepage":"https://github.com/isaacs/isexe#readme","_nodeVersion":"24.4.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==","shasum":"48f6576af8e87a18feb796b7ed5e2e5903b43dca","tarball":"http://registry-npm.ywwl.com/isexe/download/isexe-4.0.0.tgz","fileCount":41,"unpackedSize":64013,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAJ2SLZJf2Z68KuaF686MERYNpjzTg67MR0hbGb5OI8NAiAyrfHm8HDGMK8/7dPLBo8L5qMxQCbQzrzPTe3jjaSVRg=="}],"size":10590,"noattachment":false,"key":"/isexe/-/isexe-4.0.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/isexe_4.0.0_1770654482717_0.6803795249710778"},"_hasShrinkwrap":false,"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":1770654482924,"_cnpm_publish_time":1770654482924,"dist-tags":{"latest":"4.0.0"}}