1234567891011121314151617181920212223 |
- 'use strict';
- const internals = {};
- module.exports = function (method) {
- if (method._hoekOnce) {
- return method;
- }
- let once = false;
- const wrapped = function (...args) {
- if (!once) {
- once = true;
- method(...args);
- }
- };
- wrapped._hoekOnce = true;
- return wrapped;
- };
|