Socket
Book a DemoInstallSign in
Socket

is-executable

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-executable

Check whether a file can be executed

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

is-executable

Check whether a file can be executed

Install

npm install is-executable

Usage

import {isExecutable} from 'is-executable';

// On macOS
await isExecutable('/usr/bin/bash');
//=> true

// On macOS
await isExecutable('/Users/sindresorhus/unicorn.png');
//=> false

// On Windows
await isExecutable('c:\\Windows\\notepad.exe');
//=> true

API

isExecutable(filePath: string) => Promise<boolean>

isExecutableSync(filePath: string) => boolean

Keywords

executable

FAQs

Package last updated on 08 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts