Encapsulate Variable

refactorgram

let defaultOwner = {firstName: “Martin”, lastName: “Fowler”};

image/svg+xml

let defaultOwnerData = {firstName: “Martin”, lastName: “Fowler”};
export function defaultOwner()       {return defaultOwnerData;}
export function setDefaultOwner(arg) {defaultOwnerData = arg;}

aliases Self-Encapsulate Field, Encapsulate Field