How to use dispensary - 2 common examples

To help you get started, we’ve selected a few dispensary 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 mozilla / addons-linter / src / linter.js View on Github external
async _markJSLibs(addonMetadata) {
    const dispensary = new Dispensary();
    const jsLibs = {};
    const files = await this.io.getFilesByExt('.js');

    await Promise.all(
      files.map(async (filename) => {
        const file = await this.io.getFile(filename);
        const hashResult = dispensary.match(file);

        if (hashResult !== false) {
          log.debug(`${hashResult} detected in ${filename}`);
          jsLibs[filename] = hashResult;

          this.collector.addNotice({
            ...messages.KNOWN_LIBRARY,
            file: filename,
          });
github mozilla / dispensary / src / main.js View on Github external
export function createInstance(config = cli.argv) {
  log.level = config.logLevel;
  log.info('Creating new Dispensary instance', { config });

  return new Dispensary(config);
}

dispensary

SHA-256 Hashes of popular JS libraries, used by Mozilla's Add-ons Linter

MPL-2.0
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis

Popular dispensary functions