Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 13, 2024 via pnpm

isexe 2.0.0

Minimal module to check if a file is executable.
Package summary
Share
0
issues
1
license
1
ISC
Package created
17 Jan 2016
Version published
23 Mar 2017
Maintainers
1
Total deps
1
Direct deps
0
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
isexe@2.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of isexe 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does isexe do?

Isexe is a lightweight module that checks whether a file is executable and normal. It's designed for Node.js and utilizes fs.stat to assess the executability of a file. Particularly on Windows, it tests against the PATHEXT environment variable.

How do you use isexe?

To employ 'isexe', initially install it in your project. You can then import it using either ES6 import or require() statements, depending on your preference. Here's a basic usage example:

// ES6 import
import { isexe, sync } from 'isexe'

// Or... Using require
const { isexe } = require('isexe')

// Asynchronous usage
isexe('some-file-name').then(isExe => {
  if (isExe) {
    console.log('This file is executable.')
  } else {
    console.log('This file is not executable.')
  }
}).catch((err) => {
  console.error('An error occurred: ', err)
})

// Synchronous usage
try {
  const isExe = sync('some-file-name')
  if (isExe) {
    console.log('This file is executable.')
  } else {
    console.log('This file is not executable.')
  }
} catch (err) {
  console.error('An error occurred: ', err)
}

// Ignore errors and just return whether the file is executable or not
const isExe = await isexe('maybe-missing-file', { ignoreErrors: true })
const isExeSync = sync('maybe-missing-file', { ignoreErrors: true })

Note that, if you need to utilize the functionality designed for a specific platform, you can do so by importing the respective version of isexe like win32 or posix.

Where are the isexe docs?

The documentation for isexe can be found within the readme file of the isexe Git repository at https://github.com/isaacs/isexe. The documentation provides a full overview of how to use the module, the API, options and implementation details for specific platforms.