Factory Functions & Singleton Pattern

What pattern is demonstrated by the withLogging function?
const withLogging = (target) => {
  return {
    ...target,
    log(message) {
      console.log(`Log: ${message}`);
    }
  };
};

function createPerson(name) {
  const person = {
    name,
    greet() {
      return `Hello, I'm ${this.name}`;
    }
  };
  
  return withLogging(person);
}
Next Question (12/32)