JSPM

is-executable

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6131
  • Score
    100M100P100Q121187F
  • License MIT

Check whether a file can be executed

Package Exports

  • is-executable

Readme

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