Factory & Constructor Functions

How does this implementation combine Factory and Constructor patterns?
function createUser(type) {
  function Admin(name) {
    this.name = name;
    this.permissions = ['read', 'write', 'delete'];
  }
  
  function RegularUser(name) {
    this.name = name;
    this.permissions = ['read'];
  }
  
  const constructors = {
    admin: Admin,
    user: RegularUser
  };
  
  return function(name) {
    return new constructors[type](name);
  };
}
Next Question (12/20)