docs: function isExecutable(path) {
      if (!fs_1.existsSync(path))
          return false;
      try {
          var stats = fs_1.statSync(path);
          if (chek_1.isWindows()) { // just return if is file, not ideal.
              return stats && stats.isFile();
          }
          else {
              var hasGroup = stats.gid
                  ? process.getgid && stats.gid === process.getgid()
                  : true;
              var hasUser = stats.uid
                  ? process.getuid && stats.uid === process.getuid()
                  : true;
              // just didn't want additional depend.
              // see https://github.com/kevva/executable/blob/master/index.js#L13
              return Boolean((stats.mode & parseInt('0001', 8)) ||
                  ((stats.mode & parseInt('0010', 8)) && hasGroup) ||
                  ((stats.mode & parseInt('0100', 8)) && hasUser));
          }
      }
      catch (ex) {
          return false;
      }
  }