GoF desing patterns realization in JavaScript