How to use the hooker.preempt function in hooker

To help you get started, we’ve selected a few hooker 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 evolution / wordpress / test / support / mock-generator.js View on Github external
if (answers[prompt.name]) {
        return;
      }

      if (prompt.default instanceof Function) {
        answers[prompt.name] = prompt.default(answers);
      } else {
        answers[prompt.name] = prompt.default;
      }
    });

    hooker.unhook(this.app, 'prompt');

    done(answers);

    return hooker.preempt(answers);
  }.bind(this));
};

hooker

Monkey-patch (hook) functions for debugging and stuff.

MIT
Latest version published 13 years ago

Package Health Score

65 / 100
Full package analysis