update js designPattern