How to use the alfy.debug function in alfy

To help you get started, we’ve selected a few alfy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bchatard / alfred-jetbrains / src / product.js View on Github external
);
    try {
      if (fs.existsSync(customisationFilePath)) {
        const additionalProducts = JSON.parse(
          fs.readFileSync(customisationFilePath).toString()
        );
        if (additionalProducts[product.key]) {
          product = {
            ...product,
            ...additionalProducts[product.key]
          };
        }
      }
    } catch (e) {
      // die silently
      if (alfy.debug) {
        console.error(e);
      }
    }
  }

  return product;
};
github bchatard / alfred-jetbrains / src / search.js View on Github external
process.env.HOME,
      process.env.jb_search_customisation_file
    );
    try {
      if (fs.existsSync(customisationFilePath)) {
        const customSearchOptions = JSON.parse(
          fs.readFileSync(customisationFilePath).toString()
        );
        fuseOptions = {
          ...fuseOptions,
          ...customSearchOptions
        };
      }
    } catch (e) {
      // die silently
      if (alfy.debug) {
        console.error(e);
      }
    }
  }

  return fuseOptions;
};
github bchatard / alfred-jetbrains / src / debug.js View on Github external
const addTimeItem = (items, title) => {
  if (alfy.debug) {
    items.push({ title, icon: { path: alfy.icon.get("Clock") } });
  }
};