{"name":"isexe","version":"1.1.0","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.1.2"},"scripts":{"test":"tap test/*.js --branches=100 --statements=100 --functions=100 --lines=100"},"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":"5cadd61b64338cdd49249720c40fff60deedd051","_id":"isexe@1.1.0","_shasum":"3cdbafc1a3b16b11290ce4e9da58c781dc368931","_from":".","_npmVersion":"2.14.15","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"3cdbafc1a3b16b11290ce4e9da58c781dc368931","tarball":"http://registry-npm.ywwl.com/isexe/download/isexe-1.1.0.tgz","integrity":"sha512-CpfhYyGLBdgJjV+b8p0FR4tILXnL70ZVeoV2oC56CMjDVRHl5R/qznlunU3ZKu+3xFyIZLbrSGSklkAFVPtK1A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBAADDCGd13VkvVU2y0IWWfKFBACykTQz505D16C21sAiBNtwsw3MfGBEH+1nlzhzsHvW+Xz+k8Dnv8kKZVYViFTA=="}],"size":3139,"noattachment":false,"key":"/isexe/-/isexe-1.1.0.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":1453773818497,"_cnpm_publish_time":1453773818497,"dist-tags":{"latest":"4.0.0"}}