{"name":"isexe","version":"1.0.1","description":"Minimal module to check if a file is executable.","main":"index.js","directories":{"test":"test"},"devDependencies":{"mkdirp":"^0.5.1","rimraf":"^2.5.0","tap":"^5.0.1"},"scripts":{"test":"tap test/*.js --cov"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/isaacs/isexe.git"},"keywords":[],"bugs":{"url":"https://github.com/isaacs/isexe/issues"},"homepage":"https://github.com/isaacs/isexe#readme","gitHead":"111ec9c0a0ec7ed53073c1893db9745ed8d41758","_id":"isexe@1.0.1","_shasum":"5db010ed38a649d12d5faf9884b3474002e66a65","_from":".","_npmVersion":"2.14.15","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"5db010ed38a649d12d5faf9884b3474002e66a65","tarball":"http://registry-npm.ywwl.com/isexe/download/isexe-1.0.1.tgz","integrity":"sha512-MUtoZRyOOMsCXxIrBrVvjIGxGIyfjOfuHoG79OwI9U4M8zH/XTwngUrbjr+bfMxgg6mh3w+9RdqldIxLPnFLbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDKVIukLdpz5WS+azHw+9CvPtl1aR0mFcxY2EQeZCscAiEA3wMJTV82O6t65P9rbbvPTDgf7OjxsFCu3X/nTspjvSo="}],"size":2658,"noattachment":false,"key":"/isexe/-/isexe-1.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"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":1453253720406,"_cnpm_publish_time":1453253720406,"dist-tags":{"latest":"4.0.0"}}