{"name":"isexe","version":"3.1.0","description":"Minimal module to check if a file is executable.","main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","types":"./dist/cjs/index.js","exports":{".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./posix":{"import":{"types":"./dist/mjs/posix.d.ts","default":"./dist/mjs/posix.js"},"require":{"types":"./dist/cjs/posix.d.ts","default":"./dist/cjs/posix.js"}},"./win32":{"import":{"types":"./dist/mjs/win32.d.ts","default":"./dist/mjs/win32.js"},"require":{"types":"./dist/cjs/win32.d.ts","default":"./dist/cjs/win32.js"}},"./package.json":"./package.json"},"devDependencies":{"@types/node":"^20.4.5","@types/tap":"^15.0.8","c8":"^8.0.1","mkdirp":"^0.5.1","prettier":"^2.8.8","rimraf":"^2.5.0","sync-content":"^1.0.2","tap":"^16.3.8","ts-node":"^10.9.1","typedoc":"^0.24.8","typescript":"^5.1.6"},"scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","format":"prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc --tsconfig tsconfig/esm.json ./src/*.ts"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","tap":{"coverage":false,"node-arg":["--enable-source-maps","--no-warnings","--loader","ts-node/esm"],"ts":false},"prettier":{"semi":false,"printWidth":75,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"repository":{"type":"git","url":"git+https://github.com/isaacs/isexe.git"},"engines":{"node":">=16"},"_id":"isexe@3.1.0","gitHead":"c23efcc601ceb87f1df108d47e9dd9f09e6d0673","bugs":{"url":"https://github.com/isaacs/isexe/issues"},"homepage":"https://github.com/isaacs/isexe#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-RTzKlT4435HNIbKWZtifloLcA36uSBc/AsC3pl3nLZaRUZfF0gQyMbvXNAT262O0RB1Vd6rA8oXlb+iKJM7E/g==","shasum":"a980b5c36f349a306453ba35f05248e54f75cc60","tarball":"http://registry-npm.ywwl.com/isexe/download/isexe-3.1.0.tgz","fileCount":37,"unpackedSize":232443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK1oAuj6nromNeb1SzgG7fIRo9kzcX9MbXG7xDEGnpjwIhANLXinB1hyIF0L7jBN3tzMT9puYvnurnLOY63yGTo4N4"}],"size":34560,"noattachment":false,"key":"/isexe/-/isexe-3.1.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/isexe_3.1.0_1690750737400_0.025795616714981318"},"_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\nimport { isexe, sync } from 'isexe'\n// or require() works too\n// const { isexe } = require('isexe')\nisexe('some-file-name').then(isExe => {\n  if (isExe) {\n    console.error('this thing can be run')\n  } else {\n    console.error('cannot be run')\n  }\n}, (err) => {\n  console.error('probably file doesnt exist or something')\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":1690750737607,"_cnpm_publish_time":1690750737607,"dist-tags":{"latest":"4.0.0"}}