2.0.1 • Published 1 year ago
is-executable v2.0.1
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