lookpath
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.2 • Public • Published

    lookpath

    npm version npm download Node.js CI codecov Maintainability FOSSA Status

    To check if the command exists and where the executable file is, WITHOUT using child_process.

    npm install lookpath
    

    Example usage

    const { lookpath } = require('lookpath');
    
    const p = await lookpath('bash');
    // "/bin/bash", otherwise "undefined"

    Advanced usage

    const p = await lookpath('bash', {
      include: ['/home/hiromu/.bin'],
      exclude: ['/mnt']
    });
    // include: Do scan also under `~/.bin`
    // exclude: Do NOT scan under `/mnt`

    Motivation

    Issues

    Any feedback would be appreciated ;)

    License

    FOSSA Status

    Install

    npm i lookpath

    DownloadsWeekly Downloads

    15,000

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    16.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • otiai10