3a184ed31f00b88c0b05833acb02d7d425d6e390a6d45ca4e369dd0f82469d69fb84e18900a9efb78a8b2f3fd006826cee709c3bdf9afd6a99956f0bcfb13d-exec 345 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. const internals = {};
  3. module.exports = function (method) {
  4. if (method._hoekOnce) {
  5. return method;
  6. }
  7. let once = false;
  8. const wrapped = function (...args) {
  9. if (!once) {
  10. once = true;
  11. method(...args);
  12. }
  13. };
  14. wrapped._hoekOnce = true;
  15. return wrapped;
  16. };